Gcc-3.1.1 & SunOS 5.8

Claudio Bley bley@cs.uni-magdeburg.de
Tue Aug 20 06:53:00 GMT 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

>>>>> "Rui" == Rui Pacheco <ruipacheco@hotmail.com> writes:

    Rui> Things go without any problems, but whenever I try to compile
    Rui> any C++ programs, gcc doesn't seem to see the include
    Rui> files. So, if I try:

    Rui> 	c++ -g class.cc -o class

    Rui> I get these error messages:

    Rui> 	"ficheiro.h:5: 'string' is used as a type, but is not
    Rui> defined as a type."  ...

If gcc wouldn't see the include files it would say so. Your code seems
to be not C++/STL standard conformant.

All types defined as part of the C++ STL are declared in namespace
std. You need to use std::string for example - or say "using namespace
std;" resp. "using std::string;" in your code.

HTH
- -- 
Claudio Bley                                                        _ 
                                             ASCII ribbon campaign ( )
ICQ# 83197241                                 - against HTML email  X 
http://www.cs.uni-magdeburg.de/~bley/                     & vCards / \
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.6 <http://mailcrypt.sourceforge.net/>

iD8DBQE9YkmMTpSishmp0ioRAmZnAKCX3VDIB1tQuKD76CSXTDKsHiTQxQCePB57
PofctVeKB5vL7eOzgy552NU=
=565/
-----END PGP SIGNATURE-----



More information about the Gcc-help mailing list