convert from char array to string c++ code example
Example 1: change integer to string c++
string str_val = to_string(int_val);
Example 2: c++ char to string
#include <iostream>
using namespace std;
int main()
{
char c = 'l';
string str;
str.push_back(c);
}