Please take a look at this sample code.
std::cout<<"output start here"<<std::endl;
std::cout<<"output end here"<<std::endl;
output_trick *o=new output_trick();
stdout = fdopen(STDOUT_FILENO, "w");
std::cout<<"let's see where it goes"<<std::endl; return 0;
I was expecting line 19 will print the data on console but it goes no where. where I went wrong?
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)