关于动态数组的问题 [英] Question about dynamic array
本文介绍了关于动态数组的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我对动态数组有很多困惑
I have lot of confusion about dynamic array
int k*
k=new int[4];
1)我的问题是,这k = new int [4]不能包含超过5个元素
2)静态数组和动态数组之间有什么区别?
1)my question is that is this k= new int[4] can not contain more than 5 elements
2)what is difference between static and dynamic array
推荐答案
1.我的问题是,此k = new int [4]不能包含多个5个元素
否-不大于或小于4
2)静态数组和动态数组有什么区别
此处 [
1. my question is that is this k= new int[4] can not contain more than 5 elements
No - not more or less than 4
2)what is difference between static and dynamic array
Here[^]
Thanks
--RA
1)您错了:它不能包含超过4
个(四个)元素.
2)简短答案:动态数组可能会增长,而静态数组则无法增长(请参见Wikipedia
,"Array" [< ^ ]和 [
1) You are wrong: it cannot contain more than4
(four) elements.
2) Short answer: a dynamic array may grow while a static one cannot (see atWikipedia
, "Array"[^] and "Dynamic Array"[^] for more info).
这篇关于关于动态数组的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文