Skip to content

Instantly share code, notes, and snippets.

@locks
Created December 19, 2009 02:56
Show Gist options
  • Save locks/259917 to your computer and use it in GitHub Desktop.
Save locks/259917 to your computer and use it in GitHub Desktop.
CLIT (C++ Library Is a Toolkit)
namespace clit {
int stringToInt(string argumento) {
istringstream str(argumento);
int x;
return (str>>x) ? x : -1;
}
template <class T>
string toString(const T &t) {
stringstream ss;
ss << t;
return ss.str();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment