I got an app where a bunch of values are set before the calculation is
fired up.
I need an elegant way to check if all variables have been set.
So for example for double I am thinking
about a
class Double
{
private;
double val;
bool init;
public:
Double(): init(false) {}
Double( double v): val( v), init( true) {}
double Get() { if( !init) throw "Error"; return val;}
};
For calculations I might have to define many operators.
Apart from that: Into which trouble am I running?
As I am probably not the first to think about this basic issue,
is there already an implemtation for the basic POD available?
Thanks,
Marc