怎麼樣鏈接兩個char*型的字符串變量(字符串拼接)

主要使用兩個函數函數 strcat和strcpycode strcat自己就是鏈接字符串的,可是要保證空間足夠。字符串 int main() { char buff[1024]; memset(buff, 0, sizeof(buff)); const char *buff2 = " test"; strcpy(buff, "abc"); strcat(buff, buff2); pr
相關文章
相關標籤/搜索