Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C++ Moderated > Re: How to pass...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 3 Topic 9508 of 9807
Post > Topic >>

Re: How to pass enum as default argument

by Ulrich Eckhardt <eckhardt@[EMAIL PROTECTED] > Apr 17, 2008 at 03:59 AM

jeremit0 wrote:
> I have a class similar to
> 
> enum Method { a, b };
> 
> class A{
>     A();
>     void MyMethod(int i, Method m = a){
>     ...
>    }
> }

I guess the problem is in the 'similar to', because this code:

   enum method { a, b };
   void function( method m = a);

...actually compiles fine. Provide the real code, stripped down to the
very
minimum.

Uli

-- 
Sator Laser GmbH
Geschäftsführer: Michael Wöhrmann, Amtsgericht Hamburg HR B62 932


      [ See http://www.gotw.ca/resources/clcm.htm
for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]
 




 3 Posts in Topic:
How to pass enum as default argument
jeremit0 <jeremit0@[EM  2008-04-16 15:44:46 
Re: How to pass enum as default argument
Chris Uzdavinis <cuzda  2008-04-17 03:49:38 
Re: How to pass enum as default argument
Ulrich Eckhardt <eckha  2008-04-17 03:59:52 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 19 19:56:21 CDT 2008.