CString gray(\"Gray\");CString cat(\"Cat\");CString graycat = gray + cat;
要比用下面的方法好得多:
char gray[] = \"Gray\";char cat[] = \"Cat\";char * graycat = malloc(strlen(gray) + strlen(cat) + 1);strcpy(graycat, gray);strcat(graycat, cat);