Jan 27, 2012 at 11:51am
I started writing the following program
/ my first string
#include <iostream>
#include <string.h>
using namespace std;
int main ()
{
string mystring = "This is a string";
cout << mystring;
return 0;
}
when I started compiling, the copmpiler shows error at line 6 as "undefined
symbol string" may kindly elucidate.
Last edited on Jan 27, 2012 at 11:57am
Jan 27, 2012 at 12:08pm
'string' (and it's << operator) is defined in <string> not <string.h>