This variable in my program is used to accumulate the size of a folder. As soon as i press F10 to start debug(I use Microsoft Visual Studio), the variable fs (folder size) starts at 2,147,348,480. before i even create and initalize it. Then once i enter an if statement, more specifically; elseif( argc == 2 )
the variable goes to 14,757,395,258,967,641,292...thats just stupid...
I'm using boost and the variable is a boost uintmax_t like so: boost::uintmax_t fs = 0;
Its late and i can't even sleep because this problem is driving me crazy. Is this just a boost thing, or is there something wrong with the way i coded it, I don't know, any ideas?
Are you debugging without optimizations and compiling with debugging information? If the answer is no to either, the debugger is probably reading wrong memory locations.