String's in Visual C++

Status
Not open for further replies.
Hi, I'm trying to work with string under the MS Visual C++ 6.0 IDE. Here is my code:
code:<HR>
Code:
#include <stdlib.h>
#include <iostream.h>
#include <string.h><P>
#include "stack.h"<P>
void main()
{
	String s1("Test String");
	
}

And here are my errors generated when trying to compile:

code:<HR>
Code:
error C2065: 'basic_string' : undeclared identifier
error C2146: syntax error : missing ';' before identifier 's1'
error C2065: 's1' : undeclared identifier

So what am I missing here? Is this some sort of conflict with STL and MFC? This is for a data structures class and all i want to do is work with strings...thanks in advance!

Regards,
Faisal
 

-Triple-

Ars Tribunus Angusticlavius
8,554
and, visual studio doesn't like STL too much...

Well, it can be bitchy... such as when it truncates identifiers at 255 characters! Doesn't matter though, since it still works fine.

Use the STL whenever possible, and MFC only when (and if) you have to. If you're lucky enough to have a Qt license (those fsckers are expensive), then don't use MFC at all!
 
Status
Not open for further replies.