[Qt-interest] struct & class
Scott Aron Bloom
Scott.Bloom at sabgroup.com
Mon Nov 16 20:43:45 CET 2009
Ask a C++ list.. What does this have to do with Qt?
Scott
-----Original Message-----
From: qt-interest-bounces at trolltech.com
[mailto:qt-interest-bounces at trolltech.com] On Behalf Of navid navid
Sent: Monday, November 16, 2009 11:32 AM
To: qt-interest at trolltech.com
Subject: [Qt-interest] struct & class
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
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest
More information about the Qt-interest-old
mailing list