On 03/10/2011 04:46 PM, Cristian Rodríguez wrote:
ok, in case you are pointing to the right code, this crashes.
"fprintf(fi,"%d\r\n",max_record);"
is "fi" a valid file pointer... ? put after
fi = fopen("account.srt", "w+");
if(fi == NULL) perror("Error WTF!");
Looks like there is some lazy-ass code there, there is no error checking whatsoever... ;-) and just seeing the firsts bits Im afraid it doesnt quite do what you expect..
HTH.
The lazy-ass code is mine. I don't clam to be a "good" c programer. The code fragment is only a part of the program and "max-record" is defined (thanks for you input Robert you nailed it, the file was not opened). I finally found the problem with hints from both you and Robert. Thanks again, Terry -- openSUSE 11.3 -- Kernel 2.6.34 -- GNU/Linux -- Thu 03/10/11 19:15pm up 5 days 3:23, 3 users, load average: 0.01, 0.04, 0.01 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org