Description of Problem: Version-Release number of selected component (if applicable): Current 3.2 version on Red Hat 8.0 disk How Reproducible: Very. Steps to Reproduce: 1. In file test.cpp: #include <cstdlib> #include <string> #include <cstring> #include <iostream> main () { string * bob; bob = new string("stuff"); cout << bob << endl; exit 0; } 2. gcc -o mytest test.cpp 3. Actual Results: test.cpp: In function `int main()': test.cpp:8: `string' undeclared (first use this function) test.cpp:8: (Each undeclared identifier is reported only once for each function it appears in.) test.cpp:8: `bob' undeclared (first use this function) test.cpp:10: parse error before `(' token test.cpp:11: `cout' undeclared (first use this function) test.cpp:11: `endl' undeclared (first use this function) test.cpp:12: parse error before numeric constant Expected Results: A compiled program, perhaps? Additional Information: This is a clean install of RH 8.0.
Created attachment 79684 [details] Preprocessor output
This is not a ISO C++ compliant source. Please check /usr/share/doc/libstdc++-devel-3.2/ documentation. Either you can add using namespace std; after the includes, or using std::string; using std::endl; etc., or use new std::string("foo"); etc. explictly.