Bug 75546 - STL String will not properly compile
STL String will not properly compile
Product: Red Hat Linux
Classification: Retired
Component: libstdc++ (Show other bugs)
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Jakub Jelinek
Depends On:
  Show dependency treegraph
Reported: 2002-10-09 15:29 EDT by Bill Swortwood
Modified: 2008-05-01 11:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-10-09 15:31:19 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Preprocessor output (693.31 KB, text/plain)
2002-10-09 15:31 EDT, Bill Swortwood
no flags Details

  None (edit)
Description Bill Swortwood 2002-10-09 15:29:10 EDT
Description of Problem:

Version-Release number of selected component (if applicable):

Current 3.2 version on Red Hat 8.0 disk 

How Reproducible:


Steps to Reproduce:

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 

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.
Comment 1 Bill Swortwood 2002-10-09 15:31:13 EDT
Created attachment 79684 [details]
Preprocessor output
Comment 2 Jakub Jelinek 2002-10-09 15:34:46 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.