Skip to main content
gamedev.net
🔒 Locked

Weird problem with standard library

Started by The C modest god Oct 17, 2005 at 5:46 AM 4 replies 600+ views
Original Post
The C modest god
The C modest god
I have a .CPP file that uses ostringstream class. I have included (tried both in the header file and the .CPP itself) and written "using namespace std;"(tried both in the header file and the .CPP itself). However I keep getting these two errors: E:\Projects\Engine2\V0\SimpleString.CPP(161) : error C2079: 'OStr' uses undefined class 'basic_ostringstream,class std::allocator >' E:\Projects\Engine2\V0\SimpleString.CPP(166) : error C2228: left of '.str' must have class/struct/union type What does these errors mean? How do I fix it? Thanks in advance.
It's all about the wheel.Never blindly trust technoligy.I love my internal organs.Real men don't shower. Quote: Original post by Toolmaker Quote:
snk_kid
snk_kid
string streams are in header sstream not header iostream your probably getting that error because your compiler's iostream header is including the header iosfwd which just has forward declarations of all the C++ I/O streams & locales library, they do not have class definitions in that header.
MaulingMonkey
MaulingMonkey
line 161: ostreamstring is defined in , not , this may be your problem. Basically, ostringstream inherits from basic_ostringstream, and said class isn't fully defined at that point.

line 166: sounds like you have "something.str" and your compiler doesn't get the "something" bit. I'm guessing this "something" is the same thing that your compiler is failing to understand the decleration of on line 166.

If #including dosn't help, I'd upgrade beyond VC6 - but that's just me.
The C modest god
The C modest god
Thanks it worked.
A question about the Microsoft visual C++ Toolkit 2003.
What is the difference between the toolkit and the visual X++ .net standard?
Besides one is free for download and the other costs money?
It's all about the wheel.Never blindly trust technoligy.I love my internal organs.Real men don't shower. Quote: Original post by Toolmaker Quote:
Andrew Russell
Andrew Russell
Quote:
Original post by The C modest god
Thanks it worked.
A question about the Microsoft visual C++ Toolkit 2003.
What is the difference between the toolkit and the visual X++ .net standard?
Besides one is free for download and the other costs money?


The toolkit is simply the command-line compiler that you download from Microsoft.

The "Visual C++ 2003 .net Standard" is the full GUI IDE, with all the bells and whistles. Worth the investment, although you may want to wait to get the 2005 version.

It actually turns out that the toolkit compiler is better than the one that comes with the the 2003 IDE (the "Standard" compiler is not optimising). But you can just copy the toolkit compiler over the top and it "just works" - to get the best of both worlds.
Dranith
Dranith
MS also has a beta in the works, VC++ 8 Express, which is a fully functioning free IDE. I've used both it and the VC.NET 2003 IDE and there really isn't anything lacking. There are still some big kinks in it, such as having to hand edit about five different files to add additional search directories for includes and libraries, but it IS a beta, and stuff like that will get fixed. Getting it to work with the platform SDK and compile windows apps is currently a pain in the butt too. Beyond that, it has all the goodies that the pay IDEs have, such as auto-complete. It doesn't come with MFC, or even the platform SDK, but at least they offer the latter for free download.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.