I have a class with an array(public) and a private member.
When I initialize the array of the object of the class, it gives an error.
non-aggregate can't be initialized...something like this.
That private member is causing the problem.
I found a solution initializing the members one by one, but that makes the code long.
Is there any way to initialize the array in one row?
1 2 3 4 5 6 7 8
class array
{
public:
int A[n];
array();
private:
int x;
};