string doubleToString(double num) { stringstream s; s << num; return s.str(); }
bool isOnlyDouble(const char* str) { char* endptr = 0; strtod(str,&endptr); if(*endptr != '\0' || endptr == str) return false; return true; }