This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: g++ & gcc
- From: Claudio Bley <bley at cs dot uni-magdeburg dot de>
- To: <v dot pekar at web dot de>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Wed, 19 Dec 2001 18:29:25 +0100
- Subject: Re: g++ & gcc
- References: <200112191654.fBJGsAC31080@mailgate5.cinetic.de>
>>>>> "Vladimir" == <v.pekar@web.de> writes:
Vladimir> Hi! I have following problem: I have a piece of C code,
Vladimir> which can be compiled with gcc, but if I try to compile
Vladimir> it with g++ (I need it, because I'm going to use
Vladimir> io-streams), I get some errors of the kind: implicit
Vladimir> decloration of the function 'int atoi(...)' (the same
Vladimir> for bcopy(...) and bzero(...)). What do I do wrong
Vladimir> here? thank you Vladimir
Well, 'man atoi' reveals:
-----------------------------------------
SYNOPSIS
#include <stdlib.h>
int atoi(const char *nptr);
-----------------------------------------
So, for C++ you'd need to
#include <cstdlib>
Claudio