Original Post
I have a code snippet that looks like this: char inChar; unsigned short rShort; inFile.get(inChar); rShort = inChar; // first byte is little one inFile.get(inChar); rShort |= ((unsigned short)inChar << 8); I'm unclear what the last line does. The goal of the code snippet is to build an unsigned short out of two chars read from a file stream. I haven't seen the "<<" operator used outside of cin and cout much. What exactly is the last line of code doing? Thanks!