Trying to limit input to int type

Pages: 12
closed account (3qX21hU5)
C++11 also added the useful std::to_string(), std::to_wstring() and other conversion.

Stuff to strings
http://en.cppreference.com/w/cpp/string/basic_string/to_string
http://en.cppreference.com/w/cpp/string/basic_string/to_wstring

String to integers
http://www.cplusplus.com/reference/string/stoi/

String to double
http://www.cplusplus.com/reference/string/stod/

String to float
http://www.cplusplus.com/reference/string/stod/

All them also provide extra functions to convert from lets say string to long long or string to long double.
awesome, thanks a lot guys. I will spend some time studying everything you have given me, and will be back with a lot more questions when I feel I'm ready. thanks again, especially for ur code and references
Topic archived. No new replies allowed.
Pages: 12