This is the mail archive of the gcc@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


On Wed, 13 Mar 2002, Margus Metskivi wrote:
> What's different with g++3 when compiling a piece of code with:
> #include <string>
>
> int GetStr(string &Buffer);
>
> .
> .
> .
>
>
> with g++ everything works fine but g++3 gives errors like:
> "unexpected token string &"

You need to add

  using namespace std;

or change string to std::string;

Gerald
-- 
Gerald "Jerry" pfeifer@dbai.tuwien.ac.at http://www.dbai.tuwien.ac.at/~pfeifer/


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