i want to achieve a class like this:
class A{
int a;
int b;
int c;
A():a(),b(),c(){};
A(int ia,int ib,int ic=ia+ib):a(ia),b(ib),c(ic){}; //this is what i need
};
I want the ic's default value is caculated based on the ia and ib, the code here will get error when being compiled.
I wonder if there's a way to get something like this.
thanks.