BorlandGeek
Programmer
Does anyone know how you could init const vars in a class
I tried this
IN CLASS DECLERATION
const int var1;
IN CONSTRUCTOR
const_cast<int>(var1) = 10;
but this says it cannot modify const var
I tried this
IN CLASS DECLERATION
const int var1;
IN CONSTRUCTOR
const_cast<int>(var1) = 10;
but this says it cannot modify const var