Type Conversion

I have 2 strings-string temp1="XYZ"; and string temp2="ABC";Now, I concatenate the 2 strings using the Expression-string perm=temp1+temp2; My question is, How do we type-convert this string perm into type char *. I use Borland C++ compiler. I tried type-converting perm into (char *)perm, but it gives error saying type-conversion not possible.But,I want the 2 strings to be of type string and perm of type char *.Plz,tell me a solution to this prob
If you are talking about std::string, it has a member function c_str() which returns a const char*.
Please use proper English and proper spacing.

You can get a const char * from a string, calling yourstring.c_str()
Topic archived. No new replies allowed.