how can i redirect the system(cmd)

Hi,

i have used system() function in my program,

i need to redirect the output to the file;

system("test.exe 12 > temp.txt");

but it displayed in the cmd prompt when am running the program in cmd prompt. i dont want to display the result in cmd prompt.

Thanks,
Why dont you use fstream function?
Also, look at popen()
Topic archived. No new replies allowed.