string class.......

I am new to string class.....

// my first string
#include <iostream>
#include <string>
#include <conio>
using namespace std;

int main ()
{
string mystring = "This is a string";
cout << mystring;
getch();
return 0;
}



why doesn't the above code work?
I use borland compilers
The code looks fine. I know Borland is old, so perhaps it doesn't have the string class?
thanks for assuring
I'm sorry for my English, but I think that this line

#include <conio>

isn't right, maybe much better to use #include <conio.h> ?
Topic archived. No new replies allowed.