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

Re: stl + g++-3.2



>>>>> "Albert" == Albert Cervera Areny <albertca@jazzfree.com> writes:

Albert> Hi, I'm trying to compile a proogram I've developed using the
Albert> standard string and vector classes and it does compile without
Albert> problems using g++-2.95 but if I just change the links for g++
Albert> and gcc from 2.95 to 3.2 I get some errors as if string and
Albert> vector classes where not defined. Should I add something to be
Albert> able to compile it?

It is most likely because you are not using the std:: namespace.  GCC
2.95 was more lenient in enforcing the std:: namespace, but GCC 3.x
adheres to the standard much more closely, so you either need to add
std:: in front of string and vector, or add a "using namespace std;"
line at the top of your files.

-- 
Hubert Chan <hubert@uhoreg.ca> - http://www.uhoreg.ca/
PGP/GnuPG key: 1024D/124B61FA
Fingerprint: 96C5 012F 5F74 A5F7 1FF7  5291 AF29 C719 124B 61FA
Key available at wwwkeys.pgp.net.   Encrypted e-mail preferred.

Attachment: pgp4YKkE9UUuY.pgp
Description: PGP signature


Reply to: