am a newbie to this c++ thing so forgive if this seems a bit obvious.
I tried searching but to no avail....
I am getting a weird error in one of my tutorial programs. A simple effort to write data to a file.
The error says:
write.cpp: In function ‘int main()’:
write.cpp:5: error: aggregate ‘std::ostringstream strbuf’ has incomplete type and cannot be defined
write.cpp:19: error: aggregate ‘std::ofstream outf’ has incomplete type and cannot be defined
line 5 is;andCode:ostringstream strbuf;
line 19 is:they seem pretty straight forward lines to me.Code:ofstream outf;
any idea what this incomplete type thing is?
I've tried compiling on windows and linux but get the same error.
any help greatly appreciated