hi everyone,
I would like to know if file redirection can also be used compilers
installed in Win32...like the one I have called vide. the file redirection I am talking about is of this type...
< $proramName> file1.txt > file2.txt
if it is possible implementing with Win32 can anyone suggest
how I can implement the above operation currently I have program that uses command line arguments that I run this
way:
<proramName> file1.txt
and it outputs on the screen but I would like to redirect the output to another file.
thanks in advance.
this is just thebegining of the of my program.
int main(int argc, char* argv[])
{
ifstream infile;
if (argc != 2)
{
cerr<<"\n no file name specified " <<endl;
exit(-1);
}
infile.open( argv[1] );
if ( !infile )
{
cerr<<"\n can't open " << argv[1] <<endl ;
exit(-1);
}
.
.
.