Another question for the ever-reliable For Beginners helpers...
Is it possible to, and how can I, pass enumerations to functions/classes. To expand, suppose I have a class that contains a std::vector, but also had an empty enum, like so:
class myExample
{
public:
enum theEnum { };
};
would it be possible to create an enum elsewhere, give this new enum some values, and assign the empty enum with this new one (so that the values in the new enum are put into the previously empty enum:
int main()
{
myExample eg;
enum newEnum { Zero, One, Two, Three };
eg.itsEnum = newEnum;
/* or:
* enum newEnum { Zero, One, Two, Three };
* newEnum newEnumInstance;
* eg.itsEnum = newEnumInstance;
*/
Of cause, this is simple an idea of what it *could* look like, I will probably need some sort of function or something...
Any ideas on how something like this would work. I want to create an animation, however there could be several animations in that (eg. Walking, running, hopping, etc), and Id like to be able to assign these to it, if you know wht I mean... Anyway, any ideas?