I was trying out Dev-C++ and tried to compile a few simple lines:
---
#include <iostream>
#include <string>
int main()
{
string x = "Hello world!";
cout << x <<endl;
system("PAUSE");
return 0;
}
---
Without "using namespace std", the program cannot compile as if I did not have #include <iostream> or #include <string>.. why is this so? Before this many of my C++ programs can compile fine using GCC on a Solaris system without defining namespace..
And here's a newbie question: what do I need <cstdlib> for?
It's been a long while since I last used C++.. I'm guessing this is for some C functions?

---
#include <iostream>
#include <string>
int main()
{
string x = "Hello world!";
cout << x <<endl;
system("PAUSE");
return 0;
}
---
Without "using namespace std", the program cannot compile as if I did not have #include <iostream> or #include <string>.. why is this so? Before this many of my C++ programs can compile fine using GCC on a Solaris system without defining namespace..
And here's a newbie question: what do I need <cstdlib> for?