#include <iostream.h>
using namespace std;
int main()
{
char A[30] = "test";
char B[4] = "add";
strcat(A,B);//A要有足够空间扩展B中内容
cout << A << endl;
//第二种
char *a = "tttt";
char *b = "dddd";
char *dest = new char[strlen(a)+strlen(b)+1];
strcpy(dest,a);
strcat(dest,b);
cout << dest;
delete []dest;
return 0;
}