Article View: att.lang.c++
Article #48Operator OverLoading
From: adi
Date: Sun, 08 Oct 2000 00:00
Date: Sun, 08 Oct 2000 00:00
30 lines
1314 bytes
1314 bytes
Dear Friends !
Can any one help me with the following Exercise ?
I need to write a program that Over Loading the Following Operators :
--,++, -, +,
++ - Prefix & Suffix
==,!=, ||
you should OverLoad in the way that you can to do the following
operations:
int+ob, ob+int when ob-name of the object.
Solving by code will be very Appreciated
==================================================
class three_d{
int x,y,z;
public:
three_d(int i, int j, int k);
three_d();
int get(int &i, int &j, int &k)
{i=x, j=y;k=z;}
};
Thank You Very Much
Best Regards To All
==================
E-mail : adi@speedy.co.il
==================
Adi
Technical Details
Message-ID:
<3a004055.2732278@news.surfree.net.il>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10d4ba,888c94c33185eea2,start X-Google-Attributes: gid10d4ba,public From: adi@speedy.co.il Subject: Operator OverLoading Date: 2000/10/08 Message-ID: <3a004055.2732278@news.surfree.net.il> X-Deja-AN: 678886730 Distribution: global Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@surfree.net.il X-Trace: feedme.surfree.net.il 970994401 7870 212.3.202.45 (8 Oct 2000 08:40:01 GMT) Organization: Surfree News Site Mime-Version: 1.0 NNTP-Posting-Date: Sun, 8 Oct 2000 08:40:01 +0000 (UTC) Newsgroups: att.lang.c++