when I compile the following code in Dev c++ it prints correct to the file. But when I run it in MS Visual c++6.0 it creates the folder but does not prints anything to the folder why is this. I have my project due in MS software. Please help.Thanks in Advance
Code:#include <stdio.h> int logfile(); int main(){ FILE * ptr; ptr=fopen("C:\\IN.txt", "w"); fprintf(ptr, "& START "); logfile();getchar(); getchar(); } int logfile(){ FILE *ptr; ptr=fopen("C:\\IN.txt", "w"); fprintf(ptr, " goes &START\n "); }



LinkBack URL
About LinkBacks


