Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifdef __MINGW32__
- /*
- Shitty hack because mingw32 does not support this functionality yet
- */
- namespace std
- {
- template <class T> std::string to_string(T val)
- {
- std::stringstream ss;
- ss << val;
- return ss.str();
- }
- int stoi(std::string str)
- {
- std::stringstream ss;
- int ret;
- ss << str;
- ss >> ret;
- return ret;
- }
- long stol(std::string str)
- {
- std::stringstream ss;
- long ret;
- ss << str;
- ss >> ret;
- return ret;
- }
- float stof(std::string str)
- {
- std::stringstream ss;
- float ret;
- ss << str;
- ss >> ret;
- return ret;
- }
- double stod(std::string str)
- {
- std::stringstream ss;
- double ret;
- ss << str;
- ss >> ret;
- return ret;
- }
- }
- #endif // __MINGW32__
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement