Created
October 17, 2014 10:09
-
-
Save eiennohito/7d0c91381a402872408a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <sstream> | |
#include <iostream> | |
#include <string> | |
template<typename T> | |
std::string to_string(const T& x) { | |
std::stringstream i; | |
i << x; | |
return i.str(); | |
} | |
int main(int argc, char const *argv[]) | |
{ | |
std::cout << to_string(5) << "\n"; | |
/* code */ | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment