//字符串连接函数
char*strcat(char *strDestination,const char *strSource);

strcat函数将字符串strSource连接到字符串strDestination,并且在strDestination字符串末尾添加NULL字符。函数结果会改变字符串strDestination,其将用来存储连接之后的字符串。函数不对内存溢出进行检查,所以要确保strDestination指向的空间足够长,以存储连接之后的字符串。如果strDestination和strSource指向的地址有重叠,函数结果未定义(不可预期)。
返回值:
strcat函数返回目标字符串的地址(strDestination)。不可通过返回值来判断strcat函数是否执行成功


C风格字符串用strcat()拼接
c++的string直接用+拼接

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-15
  • 2022-02-17
  • 2021-06-14
  • 2021-11-19
猜你喜欢
  • 2021-12-08
  • 2022-01-08
  • 2022-12-23
  • 2021-09-10
  • 2021-07-05
  • 2021-12-22
相关资源
相似解决方案