C++11 - Standard way to convert number to string

less than 1 minute read

1
2
3
4
5
6
7
8
9
10
11
12
include<string>
using std;
    std::to_string
    std::to_wstring
    stoi: converts a string to a signed integer
    stol: converts a string to a signed long
    stoll: converts a string to a signed long long
    stoul: converts a string to an unsigned long
    stoull: converts a string to an unsigned long long
    stof: converts a string to a float
    stod: converts a string to a double
    stold: converts a string to a long double