These functions are new in C++11, and GCC only makes it available if you specify that version of the language using the command-line option -std=c++11
(or -std=c++0x
on some older versions; I think you'll need that for version 4.5).
If you can't use C++11 for some reason, you could convert using string streams:
#include <sstream>
template <typename T> from_string(std::string const & s) {
std::stringstream ss(s);
T result;
ss >> result; // TODO handle errors
return result;
}
or, if you're feeling masochistic, the C functions in such as strtoll
declared in <cstring>
.