Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
I have a question about stringstream.
I understand it is the now standardized form of strstream.
Seems like I should not use strstream anymore.
When I declared a stringstream using VC++ 6.0, I get the following error:
timestamp.cpp(52) : error C2079: 'sstream' uses undefined class 'basic_stringstream,class std::allocator >'
From what I know, a stringstream is typddef'd to be a basic_stringstream.
What's going on?
Along the same lines (and the reason I'm trying to declare a stringstream in the first place):
I need to convert a long int into a std::string. I don't want to convert it using a non-ANSI ltoa and THEN convert to a string. I want a good, solid, Standard C++ way.
Why doesn't the std::string class overload op= to take atomic datatypes?