I am having an issue with passing an enum as a default argument to a
class method. I have a class similar to
enum Method { a, b };
class A{
A();
void MyMethod(int i, Method m = a){
...
}
}
The compiler error I get says
error: default argument for 'Method m' has type '<unknown type>'
How can I use a default argument for an enum?
Thanks,
Jeremy
--
[ See http://www.gotw.ca/resources/clcm.htm
for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]