cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
Trouble with stringstream
Trouble with stringstream
Oct 31, 2012 at 3:19pm UTC
IWishIKnew
(1364)
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
Oct 31, 2012 at 3:19pm UTC
Oct 31, 2012 at 3:27pm UTC
IWishIKnew
(1364)
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|
Oct 31, 2012 at 3:28pm UTC
Peter87
(11234)
#include <sstream>
Oct 31, 2012 at 3:30pm UTC
IWishIKnew
(1364)
Thank you.
It works now.
Topic archived. No new replies allowed.