Redirecting in C++

后端 未结 2 692
闹比i
闹比i 2021-01-24 06:29
#include 
#include 
using namespace std;

void foo(){
  streambuf *psbuf;
  ofstream filestr;
  filestr.open (\"test.txt\");
  psbuf = fil         


        
2条回答
  •  终归单人心
    2021-01-24 07:18

    It seems to me that your code should work but ... Why don't you try yourself ? You will see if everything is written in test.txt or not.

提交回复
热议问题