This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: how to make it working correct(libstdc++)?
- From: Christoph Bugel <chris at tti-telecom dot com>
- To: TARZAN LION <tarzanboy at 21cn dot com>
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Mon, 12 Aug 2002 11:48:40 +0300
- Subject: Re: how to make it working correct(libstdc++)?
> From: TARZAN LION <tarzanboy@21cn.com>
> To: libstdc++@gcc.gnu.org
> #include <iostream.h>
> #include <string.h>
>
> int main()
> {
> string str("hello world!");
> cout<<str<<endl;
> return 0;
> }
Your program doesn't work with modern C++ compilers,
You should write it this way:
(BTW, this question belongs in the gcc help mailing list)
#include <iostream>
#include <string>
using namespace std;
int main()
{
string str("hello world!");
cout<<str<<endl;
return 0;
}