strange issue with reading files...
rory
rorywalsh at gmail.com
Thu Jan 17 14:43:19 PST 2008
I apologise for only getting back to this now, I was away for the past
week and a bit..
> Did you check numeric_limits to see if an 'int' can hold the number on your
> system?
> An 'int' can be 16 bits (ISO standards).
The number it should find is 1275, surely a simple int can hold that?
Even if I change to a long it still doesn't work for.
> int pos(0); // or: long pos(0);
> inFile >> pos;
> if( not pos ){ std::cerr << "No number (or zero) read!" <<std::endl;}
This returns a value of 0 for pos
Before I go any further I should probably try to find the solution to
this problem, i.e., when I skip to the end of the file and then go
back 10 bytes it doesn't read my fie size. My C++ and wxWidgets apps
report different file sizes? I have to give a presentation of this
software pretty soon and I'm running out of ideas. I may have to look
at alternative ways of doing it. Is it possible to write a program
that can change an wxWidget applications resources? If so then I could
just add the text I want available to my application like that. I can
remember using some win32 api function to this a while ago but I am
looking for a fully cross platform mechanism.
Rory.
More information about the wx-users
mailing list