class CRA_Account {
int tax[4];
double refund[4];
int SIN;
public:
CRA_Account();
}
CRA_Account::CRA_Account() {
SIN = 0;
tax[4] = { 0 };
refund[4] = { 0 };
}
When I create a object in main it'll set the SIN to 0 but won't do the same to the arrays. Can someone help why?
tax[4] = { 0 };
is wrong at many levels.. One way to initlizie your class:Online
Try to have a look at std::array