#include <sstream>
int main()
{
return 0;
}
(needless to say leaving out the include statement means getting no errors
Anyone know whats wrong?
Edited by - ziphnor on March 2, 2002 12:23:48 PM
VS .NET and sstream
One of the few things that still causes me to make mistakes after converting from Java to C++ is string-manipulation.
I HATE char*'s
Ive noticed that in some books they use ostringstream together with string to ease string stuff.
Well in the book im looking at he uses #include <sstream>.
When i try that in VS .NET i get 53(!) build errors related not to my own code but to code found in sstream
Actually this program gets 53 build errors ->
Sounds a lot like a problem in the STL shipped with your compiler. There''s nothing wrong with that code (I just tested it in GCC). I can''t prove it though, since I don''t own VS .NET.
Compiled and linked without either warnings nor errors in VC++.NET beta 2. Dont have access to the RTM yet, but I sincerely doubt they managed to break something like that.
The world holds two classes of men -- intelligent men without religion, and religious men without intelligence. Abu''l-Ala-Al-Ma''arri (973-1057; Syrian poet)
The world holds two classes of men -- intelligent men without religion, and religious men without intelligence. Abu''l-Ala-Al-Ma''arri (973-1057; Syrian poet)
--AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.[Project site] [IRC channel] [Blog]
Just tried it on VC++ 6 on my laptop, and it compiles without any problems, i must have screwed up the include directories or something like that(because i do have both SGI STL and STLPort installed).
Btw, isnt ostringstream defined in sstream? Because VC++6 doesnt like this:
It complains it doesnt know what ostringstream is...
Btw, isnt ostringstream defined in sstream? Because VC++6 doesnt like this:
#include <sstream>int main(){ ostringstream test; return 0;}
It complains it doesnt know what ostringstream is...
Found out what was wrong, the SGI STL implementations include dir was searched BEFORE the regular Vc++ include files. SGI STL doesnt have a sstream file, but it must include some files which can also be found in the SGI STL.
It works now, hope changing this doesnt screw things up elsewhere where i am using the SGI hashmap...
It works now, hope changing this doesnt screw things up elsewhere where i am using the SGI hashmap...
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement