Answers for "char to std::string c++"

C++
5

char to string c++

std::cout << std::string(1, c) << std::endl;
Posted by: Guest on March-18-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

Browse Popular Code Answers by Language