Ja> HELP!
Ja> i save it fprintf("fptr, %d", total);
Ja> i tried but it reads the contents of the file as a string!?
Ja> and i cant add # to a string. Is there a way to convert a string ->
Ja> int?
Ja> or read a file as int?
Well, yes, you could do
char szStringVariable [256];
int nIntVariable;
fgets (szStringVariable, 256, fptr);
nIntVariable = atoi (szStringVariable);
But, like I said before, check out "fread()" and "fwrite()"..
Take care,
Anthony Tibbs
... This tagline is SHAREWARE! To register, send me $10
--- Blue Wave/DOS v2.30 [NR]
---------------
* Origin: The Tibbs' Point - Ottawa, ON, Canada - Pvt (1:163/215.38)
|