in the book it says
Quote:
#include <iostream.h>
#include <stdlib.h>
#include <string>
int main(int argc, char *argv[])
{
string mystring;
mystring = "Hello there";
cout << mystring << endl;
return 0;
}
I did this, but it wont run... i also tried adding string.h instead of just string, and i tried doing the "string" instead of using the <> and same again with/without the .h .... the book is using Dev3++ though, and im using KDevelop.. but any clue of what it is? the errors i get are
Quote:
main.cpp:17:error:'string' undeclared (first use this function)
main.cpp:17:error:(each undeclared identifier is reproted only once for each function it appears in.)
main.cpp:17:error:syntax error before ';' token
main.cpp:18:error:'mystring' undeclared (first use this function)
main.cpp:21:4: warning: no newline at end of file
any clue??? as for the last error message, thats always happened when theres errors, and once the other errors are gone it dissapears...

Help










