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++ > Re: default Enu...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 7 of 8 Topic 45816 of 47032
Post > Topic >>

Re: default Enum values?

by Travis <travis.bowers@[EMAIL PROTECTED] > May 8, 2008 at 04:53 PM

On May 8, 4:12=A0pm, Ian Collins <ian-n...@[EMAIL PROTECTED]
> wrote:
> Travis wrote:
> > I'm curious, if you have an enum say...
>
> > enum Days { Mon, Tue, Wed, Thu, Fri, Sat, Sun };
>
> > I understand the default will be Mon=3D0, Tue=3D1, Wed=3D2, etc.
>
> > What I'm curious about is if there is a Days attribute in a class,
> > what is the default assuming I don't do anything with it?
>
> > For example
>
> > class Foo
> > {
> > public:
> > Days week;
> > };
>
> > If I instantiate a Foo object, what is the default of week?
>
> Unless you initialise it, the value is undefined.
>
> --
> Ian Collins.

Ah ha! That's what I was suspecting. Could you point me to any
do***entation on that fact? I'm trying to find stuff and not having
much luck.
 




 8 Posts in Topic:
default Enum values?
Travis <travis.bowers@  2008-05-08 15:37:37 
Re: default Enum values?
Ian Collins <ian-news@  2008-05-09 11:12:25 
Re: default Enum values?
brno <brno.barutchek@[  2008-05-10 10:39:30 
Re: default Enum values?
Ian Collins <ian-news@  2008-05-10 20:52:50 
Re: default Enum values?
Travis <travis.bowers@  2008-05-08 16:44:32 
Re: default Enum values?
Ian Collins <ian-news@  2008-05-09 11:58:27 
Re: default Enum values?
Travis <travis.bowers@  2008-05-08 16:53:47 
Re: default Enum values?
Greg Herlihy <greghe@[  2008-05-10 03:00:40 

Post A Reply:
  Go here to Signup

AddThis Feed Button


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

Contact
tan12V112 Fri Jul 25 15:52:24 CDT 2008.