It's a bitwise operation, not logical -> therefore one | is correct.
On the topic: what do you mean by absurd and weird? How do you run your code? Which compiler/OS do you use?
This line looks weird:tempStream.read((char*)tempBook,sizeof(tempBook));. If tempBook is a pointer - then the sizeof will return 4 and too few data will be read. If tempBook is an instance - then the conversion to char* should fail .