Hi there!I've just received my new PowerMac and I 've run into the following problem with OS X 10.2.
Sample Code:
---------------
#include <string>
int main() {
string test("abc");
cout << test << endl;
}
--------------
This piece of code works when it is compiled with gcc 2.95.4 (g++2 test.cpp -o test)
GCC 3.1: g++ test.cpp -o test gives the following error:
test.cpp: In function `int main()':
test.cpp:4: `string' undeclared (first use this function)
test.cpp:4: (Each undeclared identifier is reported only once for each function
it appears in.)
test.cpp:4: parse error before `(' token
test.cpp:5: `cout' undeclared (first use this function)
test.cpp:5: `test' undeclared (first use this function)
test.cpp:5: `endl' undeclared (first use this function)
I've just started programming in C++ so I don't know a solution. I've installed the Developer CD on a clean 10.2 system.
Thanks in advance
Duke