generate wrong code in C++
Brought to you by:
niklauslee
for an example, I add an operation named abc with parameter a in double with default value 0. it generates:
class xxx{
void abc(double a = 0);
};
void xxx::abc(double a = 0){ //g++ said error here, right is void xxx::abc(double a){
}
and then, the constructor will be with void type returned. it will cause compile error, either.
Regards,
LeiMing
I'm sorry. Now I know that it's because I don't know how to create a constructor.
about the constructor it's my problem.