S
s88
Hi all,
I like to implement a new syntax in C++ for my work. It supposed to be
(a,b) , which represents a+b, for example.
My implementation as following...
inline myClass operator () (myClass &left, myClass &right);
the usage of this operator is
cout << (a,b) << endl;
However, g++ reports
"warning: left-hand operand of comma has no effect"
Does it mean the 'a' has no effect? How should I do?
thanks,
Dave
I like to implement a new syntax in C++ for my work. It supposed to be
(a,b) , which represents a+b, for example.
My implementation as following...
inline myClass operator () (myClass &left, myClass &right);
the usage of this operator is
cout << (a,b) << endl;
However, g++ reports
"warning: left-hand operand of comma has no effect"
Does it mean the 'a' has no effect? How should I do?
thanks,
Dave