change int to string cpp

C++
#include <string> 

std::string s = std::to_string(42);
Source

Also in C++: