char*與str互相轉換

#include<string.h> 1) char[]->string char*a = "we are happy"; string s; s = a ; 2 string->char* string s="we are happy" char x[30]; strcpy(x,s.c_str());
相關文章
相關標籤/搜索