【发布时间】:2016-11-05 19:31:16
【问题描述】:
我在结构中有一个数组,我想通过用户的输入输入它的大小。
struct queue
{
int maxSize;
int count;
int* element;
};
element 是数组,现在我想将它的大小设置为“5”并将所有“5”单元格初始化为“0”
struct queue q;
*element -> ??
【问题讨论】:
-
选择一种语言,
C或C++。它们不是一回事,如果是 C++,答案可能会有所不同。
标签: c++ c arrays pointers struct