int转char*(itoa)
int number = 123456;
char str[25];
itoa(number, str, 10);
int n;
char *str = "12345.67";
n = atoi(str);
string 转 char*
string str="gdfd";
char *p=str.c_str();
char* 转 string(可直接赋值)
string s;
char *p = "adghrtyh";
s = p;
或者
string s(p)
const char*转char*
const char* cpc = "abc";
char* pc = new char[100];//足够长
strcpy(pc,cpc);