Trouble with stringstream

I cant seem to figure out its syntax. I followed the cplusplus reference exactly and it wont work. Can someone post some code that's syntactically correct for me? I would really appreciate this.

Thank you.

What i've been trying so far:

1
2
3
4
5
6
string conv_int(int x)
{
    stringstream ss;
    ss<< x;
    return ss.str();
}
Last edited on
heres the error i get:

C:\Users\Username\Desktop\C++\Checkbook Pro\common.cpp|37|error: aggregate 'std::stringstream ss' has incomplete type and cannot be defined|
#include <sstream>
Thank you.

It works now.
Topic archived. No new replies allowed.