再问c语言连接两个字符串的函数(50分)

  • 主题发起人 sendittome
  • 开始时间
字符串拷贝即可
 
AnsiString A,B,C;
B="askdfksdakf";
C="sdkfk";
A=B+C;
就完成了啊!
 
>>再问c语言连接两个字符串的函数
是C语言,不是C++语言,是吗?
#include <string.h>
#include <stdio.h>
int main(void)
{
char destination[25];
char *blank = " ", *c = "C++", *Borland = "Borland";
strcpy(destination, Borland);
strcat(destination, blank);
strcat(destination, c);
printf("%s/n", destination);
return 0;
}
 
多人接受答案了。
 
顶部