I have a general question about binary numbers in c++. I am reading in a binary file of 32-bit numbers, and then writing these numbers to a text file. My question is, when I do
long int temp;
temp = ( fileBuf[N * 4 * i + 4 * j + 0] << 24 |
fileBuf[N * 4 * i + 4 * j + 1] << 16 |
fileBuf[N * 4 * i + 4 * j + 2] << 8 |
fileBuf[N * 4 * i + 4 * j + 3] << 0 );
myfile1 << temp << "\t";
does c++ understand that I want it to reinterpret the binary as a decimal number?