LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   /ArgParser.cpp:207: error: 'atoi' was not declared in this scope (https://www.linuxquestions.org/questions/linux-newbie-8/argparser-cpp-207-error-atoi-was-not-declared-in-this-scope-681051/)

Jane2008 11-04-2008 09:26 AM

/ArgParser.cpp:207: error: 'atoi' was not declared in this scope
 
I tried to install a software on Debian Linux.
When I compiled this program, the following errors were showed:
ArgParser.cpp: In member function 'virtual size_t CmdArgInt::parse(const char*)':
../ArgParser.cpp:207: error: 'atoi' was not declared in this scope
../ArgParser.cpp: In member function 'virtual size_t CmdArgDouble::parse(const char*)':
../ArgParser.cpp:224: error: 'atof' was not declared in this scope
make[2]: *** [ArgParser.o] Error 1
make[2]: Leaving directory `/home/hxu/EPICS/extensions/src/ChannelArchiver/Tools/O.linux-x86'
make[1]: *** [install.linux-x86] Error 2
make[1]: Leaving directory `/home/hxu/EPICS/extensions/src/ChannelArchiver/Tools'
make: *** [Tools.install] Error 2

I searched the Internet for related information and none was useful.
I'd like someone to put me out from this question.
Thanks!

beiller 11-04-2008 01:23 PM

atoi = converts to an interger
atof = converts to a float.

these functions are included in one of these header files:

#include <stdio.h>
#include <stdlib.h>

try viewing ArgParser.cpp and make sure these include lines are near the top

see:
http://www.cplusplus.com/reference/c...dlib/atoi.html
http://www.cplusplus.com/reference/c...dlib/atof.html

for more info

Jane2008 11-07-2008 09:23 AM

Thank.
It worked now.


All times are GMT -5. The time now is 05:35 AM.