1.Convert string to numeric
#include <string>
#include <sstream>
#include <iostream>
// the third parameter of from_string() should be
// one of std::hex, std::dec or std::oct
template < class T>
bool from_string(T& t,
const std::string& s,
std::ios_base& (*f)(std::ios_base&))