int into stringstream code example Example: convert int to string c++ int x = 5; string str = to_string(x);