problems converting string to char
i searched the forum for string to char posts and tried a good one for converting a string to char:
It gives the right output but appends some weired output and i dont know how to fix it. I also tried to use:
string mystring = "that this and those";
char mychar[mystring.length()] = "";
for (int i=0; i < mystring.length(); i++)
mychar[i] = mystring[i];
cout << mychar;
But doesnt work either. There is still this weired appended output.
for (int i = 0; i < mystring.length();++i )
Thanks in advance!