Oh, you have to include another header to use stringstreams, thats the problem. I thought it was in <string>.
By the way, I have more than one book on the STL, I was just too stupid and lazy to use them in this case.
Well, there are many different flavors of "professional Windows Programming using VC++". Some of these use Visual C++ but don't use C++, mostly because Windows was written in plain C (and therefore the WinAPI too).
Personally, I do things using the WinAPI and still use C++ in "my...
I guess there's no built in function for this (C++ doesn't have many high level string torturing functions in the standard library) so you'll probably have to code your own.
The count-spaces-approach sounds good but won't work if there are multiple spaces between words. You could go through the...
The topic says it all, how do I convert an integer to a std::string?
I've read something about using a stringstream from chipperMDW, but that doesn't work. MS VC++ 6.0 doesn't like the stringstream:
main.cpp(34) : error C2079: 'conv' uses undefined class 'basic_stringstream<char,struct...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.