fixed cpp binding

guys, you can't just assume that any system has or will always allow some user code to get access to /dev/stdout