Hi all!
This is my problem:
void getfiles(char *f){
freopen(f,"a",stdout);
fprintf(f,"%s",system("dir /b c:\\bcn\\data\\*.*"
);
fclose(f);
}
It works correctly, but the rest of the programm also is written in 'f'. I want to write the rest of output in normal stdout. How can I disconnect f and stdout to handle that?
Thanks for help in advance!
Br maschwa
This is my problem:
void getfiles(char *f){
freopen(f,"a",stdout);
fprintf(f,"%s",system("dir /b c:\\bcn\\data\\*.*"
fclose(f);
}
It works correctly, but the rest of the programm also is written in 'f'. I want to write the rest of output in normal stdout. How can I disconnect f and stdout to handle that?
Thanks for help in advance!
Br maschwa