Converting char[] to string

What would be the best way to convert char[] to string?

Thanks in advance.
1
2
char mychar[] = "bob";
string mystring  = string(mychar);


:)
Topic archived. No new replies allowed.