📜  错误:聚合对象需要使用“{...}”进行初始化 - C++ 代码示例

📅  最后修改于: 2022-03-11 14:44:47.061000             🧑  作者: Mango

代码示例1
int arrayone[3] = {0}; // assign all items with 0

int arraytwo[3] = {1, 2, 3 }; // assign each item with 1, 2 and 3

int arraythree[3]; // assign arraythree with arraytwo
for (int i = 0; i < 3; ++i) {
    arraythree[i] = arraytwo[i];
}