动态数组2
来源:互联网 发布:微信小视频软件制作 编辑:程序博客网 时间:2024/06/05 23:56
#include <iostream>#include <string>using namespace std;int main (){ const char *pc = "xiao cui ai ni";const size_t len = strlen(pc);for(size_t i = 0; i != 100; ++i){ char *pc2 = new char[len + 1];strcpy(pc2,pc);cout << pc2 << endl;delete[] pc2;}string str("xiao cui ai ni");for(int i = 0; i != 50; ++i){string str2 = str; //就是string copy!cout << "C++:" << str2 << endl;}return 0;}
0 0
- Delphi动态数组2
- 2维动态数组
- 动态数组2
- 动态数组
- 动态数组
- 动态数组
- 动态数组
- 动态数组
- 动态数组
- 动态数组
- 动态数组
- 动态数组
- 动态数组
- 动态数组
- 动态数组
- 动态数组
- 动态数组
- 动态数组
- CSS3 输入框阴影效果及其他阴影效果
- 23种java设计模式例子汇总
- SpringMVC中用@ParamVariable传递的参数包含斜杠(/)时,匹配不了报404错误的解决方案
- 动态数组1
- Git(5)服务器上的Git
- 动态数组2
- In my project it is working fine, This is my build.gradle code:
- Java Web学习总结(2)——Servlet入门
- Mat格式图像在MFC程序中的显示
- hdu 1015 Safecracker
- linux系统下创建oracle表空间和用户权限查询
- SharedPreferences跨应用跨进程获取数据
- Leetcode237: Palindrome Partitioning II
- 字符转换