Passing enum value thru a function call using C++
Posted: Thu Sep 14, 2006 7:12 pm
Hi ,
I am having some difficult in passing
inthe header file
enum operatorType
{
add,sub,mult,not
};
operatorType p_operatorType;
Class{
}
in the .cc file
calling
fn (A, p_operatorType,B);
have it defined like so
double fn(double A, enum operatorType *op, double B )
Any ideas why the C++ compiler doesn't like enum type
???
I am having some difficult in passing
inthe header file
enum operatorType
{
add,sub,mult,not
};
operatorType p_operatorType;
Class{
}
in the .cc file
calling
fn (A, p_operatorType,B);
have it defined like so
double fn(double A, enum operatorType *op, double B )
Any ideas why the C++ compiler doesn't like enum type
???