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 - C++ Learning > Re: Returning a...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 4 Topic 4099 of 4370
Post > Topic >>

Re: Returning an enum (C++)

by Richard Heathfield <rjh@[EMAIL PROTECTED] > Apr 9, 2008 at 01:06 AM

DerekBaker said:

> It's impossible to return the whole enum, rather just one element of it?

Yes, it's impossible (short of populating, say, a vector with all the 
possible values and then returning the vector). Enumerations are not 
"collections" of values, but lists of possible values, so the term "the 
whole enum" doesn't really make any sense. It's a bit like asking whether 
it's possible to return all the possible values a char can have.

-- 
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www.
+rjh@[EMAIL PROTECTED]
 users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
 




 4 Posts in Topic:
Returning an enum (C++)
DerekBaker <Derek@[EMA  2008-04-09 01:58:04 
Re: Returning an enum (C++)
Ian Collins <ian-news@  2008-04-09 13:01:55 
Re: Returning an enum (C++)
Richard Heathfield <rj  2008-04-09 01:06:25 
Re: Returning an enum (C++)
Anand Hariharan <znvyg  2008-04-09 03:57:57 

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 Nov 21 11:44:13 CST 2008.