I dont mean a variable in a class but a default value for the class as a whole.
struct Scalar {
unsigned int value;
void toThePowerOf(int power);
// etc.
}
I'd like to be able to do something like
Scaler foo;
foo.value = 2;
foo.toThePowerOf(2);
std::cout << foo << std::endl; // Outputs 4!
Is that possible in C++?