strcat函数实现
#include <iostream>
using namespace std;
char* strcatcp(char *des, char *source1, char *source2)
{
char *p = des;
while ((*des++=*source1++)!='\0');
des--;
while ((*des++=*source2++)!='\0');
return p;
}
int main(void)
{
char *des, *source1, *source2;
des = (char *)malloc(sizeof(source1)+sizeof(source2));
source1 = "hello";
source2 = "world";
des = strcatcp(des, source1, source2);
cout<<des<<endl;
return 0;
}