I have seen a class where someone named member variables min
and max
class A
{
public:
A();
~A();
bool min;
bool max;
...
};
with a constructor
A::A()
{
min=false;
max=true;
...
}
I have tried to rewrite it with usage of an initialization list:
A::A():min(false), max(true){}
but I have received an warning + error
warning C4003: not enough actual parameters for macro 'min'
error C2059: syntax error : ')'
because min
macro is defined in WinDef.h
Is it possible to use initialization list in this situation without renaming of the member variables?