I am trying to compare a value returned by a function within a class object with a set value...
Code:
if (theCircuit.at(i)->getType() == 3) { ...some code... }
at compilation, the following error:
Code:
D:\WORK\CIRCUIT.CPP(101) : error C2446: '==' : no conversion from 'const int' to 'int (__thiscall LogicGate::*)(void)'
There are no conversions from integral values to pointer-to-member values
the function that is being used is:
Code:
int LogicGate::getType(){
return gateType; // gateType is a private int for class LogicGate
}
What i want to do is compare the gateType variable, in order to find out the type of gate that is at the current position in the vector!!!