Answers for "convert from char array to string c++"

5

change integer to string c++

string str_val = to_string(int_val);
Posted by: Guest on October-12-2020
2

c++ string to char array

const char *array = tmp.c_str(); //For const char array
char *array = &tmp[0]; // If you need to modify the array
Posted by: Guest on September-28-2020
1

c++ char to string

#include <iostream>
using namespace std;

int main()
{
  char c = 'l';
  string str;
  str.push_back(c);
}
Posted by: Guest on June-20-2020

Code answers related to "convert from char array to string c++"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language