#include #include using namespace std; void foo(){ streambuf *psbuf; ofstream filestr; filestr.open (\"test.txt\"); psbuf = fil
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.