|
From: Ioannis V. <no...@ya...> - 2001-11-07 12:01:52
|
> -----Original Message----- > From: dev...@li... > [mailto:dev...@li...] On Behalf > Of Gregor Peter > Sent: Wednesday, November 07, 2001 7:21 AM > To: dev...@li... > Subject: [Dev-C++] C vs C++ > Importance: High > > > My Compiler complains about the following codelines > > lineNo: c-code > 59: char *currentObjName = calloc( 100, sizeof( char ) ); char *currentObjName=new char[100]; memset(currentObjName, 0, 100); // makes all zeros > 64: mltext = malloc( 10*sizeof(char)); mletext=new char[10]; > 318: mltext = realloc( mltext, > (strlen(mltext)+yyleng)*sizeof(char) ); You use wring approach, use string type defined in <string> Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.f2s.com * Alternative URL: http://run.to/noicys |