BeePo
August 20th, 2002, 09:39 AM
hi i have a function called
writetofile(const char* filename)
{
FILE *stream;
stream = fopen(filename,"a+");
fprintf( stream,"%s",strptr); // printing the orginal string
fprintf(stream," ");
fclose(stream);
}
when I call the function first time, i got no proglem.. but when i calll next time, I got run time error.... why is that?
writetofile(const char* filename)
{
FILE *stream;
stream = fopen(filename,"a+");
fprintf( stream,"%s",strptr); // printing the orginal string
fprintf(stream," ");
fclose(stream);
}
when I call the function first time, i got no proglem.. but when i calll next time, I got run time error.... why is that?