Posted on 2002-05-20
This is what i'm tryting to...
CString fName = "C:\\Test\\test.txt";
unsigned long mylong;
f.Open(fName, CFile::modeRead, NULL);
fsize = myFile.GetLength();
mylong = atol(buff);
Note: test.txt contains a long value of more than 10 digits (e.g. 2523223232)
The question is, why when i print out mylong the another file, it gave me a negative number?
This is how i printed out...
fp = fopen(filename,"w+");
fprintf (fp, "Test value = %ld\n", mylong);
Please help. Thanks!