当前位置:网站首页 > 技术博客 > 正文

malloc函数的格式



通过字符串函数连接两个字符数组:

#include "stdafx.h" #include <iostream> using namespace std; void main() { char str1[50], str2[30], *p1, *p2; p1 = str1; p2 = str2; cout << "please input string1:" << endl; gets_s(str1); cout << "please input string2:" << endl; gets_s(str2); strcat_s(str1, str2);//对字符串也行,对数组也行 cout << "the new string is:" << endl; puts(str1); }

  • 上一篇: window.clientwidth
  • 下一篇: android sdk
  • 版权声明


    相关文章:

  • window.clientwidth2024-11-22 16:01:02
  • C++基础知识2024-11-22 16:01:02
  • python爬虫入门教程(非常详细)2024-11-22 16:01:02
  • c语言结构体指针怎么用2024-11-22 16:01:02
  • 微信小程序如何生成二维码2024-11-22 16:01:02
  • android sdk2024-11-22 16:01:02
  • linux文件md5如何计算2024-11-22 16:01:02
  • html的表单2024-11-22 16:01:02
  • 端口映射器v5.82024-11-22 16:01:02
  • iconv argument list too long2024-11-22 16:01:02