Mail Archives: djgpp/1997/08/14/04:32:53
From: | Jeff Weeks <pweeks AT execulink DOT com>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | C++ overloaded operators and operator preceedence
|
Date: | Sun, 10 Aug 1997 11:28:10 -0400
|
Organization: | Code X Software
|
Lines: | 20
|
Message-ID: | <33EDDE0A.2014C272@execulink.com>
|
NNTP-Posting-Host: | ppp45.neptune.execulink.com
|
Mime-Version: | 1.0
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Alright, does anybody know if operator preceedence (or, order of
operations) is preserved when you overload an operator in C++?
For instance, if you overload the * operator, will it still be processed
along side division in the operator preceedence? Or will overloaded
operators just be interpreted from left to right?
In simpler terms will 3 + 2 * 2 equal 7 or 10 if both + and * are
overloaded?
Thanks,
Jeff
--------------------------------------------
- Code X Software -
Programming to a Higher Power
email: mailto:pweeks AT execulink DOT com
web: http://www.execulink.com/~pweeks/
--------------------------------------------
- Raw text -