G
Gary Labowitz
Is it permissable to place default arguments in the definition of a
constructor rather than in the declaration.
Following extract:
class X
{
public:
X(int arg1, int arg2);
....
}
X::X(int arg1=7, int arg2=9)
{
...
}
compiles using Dev-C++ (mingw); fails using VC++.
Which compiler is right?
constructor rather than in the declaration.
Following extract:
class X
{
public:
X(int arg1, int arg2);
....
}
X::X(int arg1=7, int arg2=9)
{
...
}
compiles using Dev-C++ (mingw); fails using VC++.
Which compiler is right?