Hi all. Is there any way to initialize an entire array in the constructor.
The code below does not work. Thanks.
class x {
public:
int array[2][2];
x();
};
x::x() {
array = {{1,2},{3,4}};
}
The code below does not work. Thanks.
class x {
public:
int array[2][2];
x();
};
x::x() {
array = {{1,2},{3,4}};
}
Comment