[Qt-interest] struct & class
navid navid
n_nnavid at yahoo.com
Mon Nov 16 20:32:11 CET 2009
Hello All,
Because of unavailability of operator == or != for structure comparison, I had to change {struct of variables} to {class of variables with operator definition}.
but now, the functions that returned SETPOINT, can't return SetPoint; and show "error: `SetPoint' does not name a type"
struct SETPOINT
{
double a;
int b;
double c;
int d;};
class SetPoint
{
public:
double a;
int b;
double c;
int d;
bool operator!=(SetPoint other)
{
return ((a!=other.a) ||
(b!=other.b)||
(c!=other.c) ||
(d!=other.d));
}
};
what is solution?
regrads
navid
More information about the Qt-interest-old
mailing list