J
JKop
Take the following:
enum Sense
{
Vision,
Hearing,
Touch,
Smell
};
void Jaguar(const Sense& sense)
{
return;
}
int main(void)
{
Sense sense = Hearing;
Jaguar(sense);
Jaguar(Hearing);
int Hearing;
Jaguar(Sense::Hearing); //ERROR `Sense' is not an aggregate type
return 0;
}
How do I tell it that I'm referring to "Hearing" from the enum "Sense", and
not the local variable entitled "Hearing"?!
-JKop
enum Sense
{
Vision,
Hearing,
Touch,
Smell
};
void Jaguar(const Sense& sense)
{
return;
}
int main(void)
{
Sense sense = Hearing;
Jaguar(sense);
Jaguar(Hearing);
int Hearing;
Jaguar(Sense::Hearing); //ERROR `Sense' is not an aggregate type
return 0;
}
How do I tell it that I'm referring to "Hearing" from the enum "Sense", and
not the local variable entitled "Hearing"?!
-JKop