Answers for "convert char* to string"

4

string to char*

std::string str = "string";
const char *cstr = str.c_str();
Posted by: Guest on February-24-2021
2

Convert char to string java

// Convert char to string java
public class CharToStringJava
{
   public static void main(String[] args)
   {
      char ch ='G';
      String str = Character.toString(ch);
      System.out.println("char to string is: " + str);
   }
}
Posted by: Guest on February-19-2021
0

convert char

char[] chars = {'a','b','c','d','e'};
string s = new string(chars);
Posted by: Guest on January-01-1970

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language