I have a variable of type "char *". I want to copy its (this variable's) content to a string object. How can I do that?
mychar = new char ;
strcpy(mychar, "Hello World");
//How to copy mychar into mystring.
//I know, I can copy "Hello World" directly into mstring by writing mystring("Hello World"). But I need to copy the content of the "char *" variable, mychar, into the string, mystring.
How can I do this?
Help me if you know...