enum generate simple question

B

Belars

Enumerating functions instead of integral variables in
enum{//functions..} is possible ?
If not, how can i create a 'bowl' like enum{} to hold functions that
all are automatically enumerated ?
 
M

Mark P

Belars said:
Enumerating functions instead of integral variables in
enum{//functions..} is possible ?
If not, how can i create a 'bowl' like enum{} to hold functions that
all are automatically enumerated ?

No, enums are integral types. You can make a container of function
pointers or function objects (functors) provided they all have the same
type.
 
R

Rolf Magnus

Belars said:
Enumerating functions instead of integral variables in
enum{//functions..} is possible ?

What exactly does "enumerating functions" mean?
If not, how can i create a 'bowl' like enum{} to hold functions that
all are automatically enumerated ?

Automatically enumerated?
 
D

Default User

Belars said:
Enumerating functions instead of integral variables in
enum{//functions..} is possible ?
If not, how can i create a 'bowl' like enum{} to hold functions that
all are automatically enumerated ?

Your question doesn't make a lot of sense. Explain what problem you are
trying to solve with this, preferable with example usage. There are
ways to create containers of function pointers, but there're not widely
used and are rather limited.




Brian
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top