This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: string class


"Chris Wolstenholme" <chris@blueband.demon.co.uk> writes:

> You need to specify the namespace for the string (which happens to be std).
> 
> There are two options:
> 
> include<string.h>

You mean '#include<string>' , without the '.h'

>  
>  int main()
> {
>   std::string s1("hello world");
>  
>  return 0;
> }
[snip]


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]