RE: string class

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Do this instead:

#include <string>

using namespace std;

int main()
{
	string s1("hello world");

	return 0;
}

Make sure you compile it with g++.

Cheers,
Lyle


-----Original Message-----
From: gcc-help-owner@xxxxxxxxxxx [mailto:gcc-help-owner@xxxxxxxxxxx] On
Behalf Of Wim Verleyen
Sent: Friday, June 04, 2004 12:08 PM
To: gcc-help@xxxxxxxxxxx
Subject: string class

Hello,

I try to compile following C++ program on gcc/g++ version 3.3.

include<string.h>

int main()
{
	string s1("hello world");

	return 0;
}

make gives me:

-  string undeclared (first use in this function)....

plz help me...

Wim




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux