TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: JABO
from: ANTHONY TIBBS
date: 1998-03-05 18:51:00
subject: Re: HELLLLLLLLLLLLLLLLLLLLLP

 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)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.