oldmanstan
January 15th, 2006, 03:40 AM
ok, this is an edit, the below problem is solved, figured it out right after posting, i needed to include <string> and <sstream>, oops. however, what is the difference between ostringstream and stringstream?
Ok, here's what i'm trying to do, convert an int to a std::string. i'm trying to use the stringstream type, i'm basically copying an example i found using google, but mine won't compile, here's the code basically...
std::stringstream ResultStream;
ResultStream << i;
return ResultStream.str();
however, when i compile it using g++ i get the following error:
bigints.cpp:212: error: aggregate ‘std::stringstream ResultStream’ has incomplete type and cannot be defined
any ideas? thanks a bunch!
Ok, here's what i'm trying to do, convert an int to a std::string. i'm trying to use the stringstream type, i'm basically copying an example i found using google, but mine won't compile, here's the code basically...
std::stringstream ResultStream;
ResultStream << i;
return ResultStream.str();
however, when i compile it using g++ i get the following error:
bigints.cpp:212: error: aggregate ‘std::stringstream ResultStream’ has incomplete type and cannot be defined
any ideas? thanks a bunch!