Answers for "error: initialization with "{...}" expected for aggregate object - c++"

C++
0

error: initialization with "{...}" expected for aggregate object - c++

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];
}
Posted by: Guest on October-04-2021

Browse Popular Code Answers by Language