can we assign const char * to string

Hi i m tring to assign const char * to string its giving core dump(runtime error)...........
Show the code
You can assign const char* to string. It will throw you an error if const char* == 0 though
void setRetransServerSourceId(const char* str) { m_RetransSourceId = str; };
std:;string m_RetransSourceId ;
Topic archived. No new replies allowed.