Answers for "c++ cast char to string"

C++
5

c++ cast char to string

// example
char sczName[] = {"Jakes"};
std::string strName = std::string(sczName);

/* SYNTAX
#include <string>
std::string(<char-to-convert>)
*/
Posted by: Guest on April-06-2020
4

char to string c++

std::cout << std::string(1, c) << std::endl;
Posted by: Guest on March-18-2020

Browse Popular Code Answers by Language