码迷,mamicode.com
首页 > 编程语言 > 详细

C++编程技巧(长期更新)

时间:2016-12-20 11:46:42      阅读:145      评论:0      收藏:0      [点我收藏+]

标签:keyword   array   color   val   nat   新建   数组   ++   dex   

1.数组使用

int* p = new int[5](); // 数组新建并全部初始化为0
等价于:
int* p;
p = new int[5]();
int* q = new int[5];   // array elements all have indeterminate value
 

C++编程技巧(长期更新)

标签:keyword   array   color   val   nat   新建   数组   ++   dex   

原文地址:http://www.cnblogs.com/Anita9002/p/6201981.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!