My binary file looks like this.
00000000: 0000 0803 0000 ea60 0000 001c 0000 001c
00000010: 0000 0000 0000 0000 0000 0000 0000 0000
left column is address.
I just tried to read 0000 0803
(=2051) as follows
ifstream if;
if.open("file");
uint32_t a;
if >> a;
As expected...It did not work :-(
a
was just 0 after execution.
I tried long, int, unsigned int, unsigned long
. All failed.
Why these are not working and how can I achieve the goal?