在C++中怎样运用数组连接两个字符串(比如将thank和you)

[复制链接]
查看11 | 回复3 | 2016-2-22 22:25:01 | 显示全部楼层 |阅读模式
是利用指针来完成

回复

使用道具 举报

千问 | 2016-2-22 22:25:01 | 显示全部楼层
strcat原型:extern char *strcat(char *dest,char *src);用法:#include 功能:把src所指字符串添加到dest结尾处(覆盖dest结尾处的'\0')并添加'\0'。返回指向dest的指针。strcat 源码实现Char* strcat ( char * dst , const char * src )用法:#include 功能:Concatenates src onto the end of dest. Assumes enough space in dest.返回结果:The address of "dst"...
回复

使用道具 举报

千问 | 2016-2-22 22:25:01 | 显示全部楼层
strcat函数,是C的标准函数。 char *strcat( char *strDestination, const char *strSource ); The strcat function appends strSource to strDestination and terminates the resulting string...
回复

使用道具 举报

千问 | 2016-2-22 22:25:01 | 显示全部楼层
strcat(str1,str2)str2 is appent to str1if you use 2 object such as ,array1[10],array2[10],you can use strcat like strcat(array1,array2).notice:You've to make sure that array ...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行