From: Matthew Heaney <matthewjheaney@earthlink.net>
Subject: Re: Overloading + operator
Date: Mon, 25 Aug 2003 05:51:22 GMT
Date: 2003-08-25T05:51:22+00:00 [thread overview]
Message-ID: <u7k52i8se.fsf@earthlink.net> (raw)
In-Reply-To: 3F4981C5.BDF45D51@erols.com
Daniel Allex <dallex@erols.com> writes:
> I have some Ada code that overloads the + operator. When I wrote the
> code, I specified the left and write operand types. In C++ it seems
> as though I can only overload the + operator in relation to a class.
Yes, you can override the predefined "+" operation in Ada.
> I have a structure that contains 3 elements. I want to add a value to
> the structure. Do I need to create a class and the add a value to the
> object?
Why don't you just add it? Why can't you simply modify the code?
next prev parent reply other threads:[~2003-08-25 5:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-25 3:25 Overloading + operator Daniel Allex
2003-08-25 5:51 ` Matthew Heaney [this message]
2003-08-25 13:43 ` Stephen Leake
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox