Re: Operator Overloading <<
- From: Austin Ziegler <halostatue@xxxxxxxxx>
- Date: Fri, 30 Sep 2005 08:15:04 +0900
On 9/29/05, matt.hulse@xxxxxxxxx <matt.hulse@xxxxxxxxx> wrote:
> Is there a way to overload '<<' in the Array class?
>
> Or perhaps there's a better approach to my problem. I have a class
> that inherits from Array. I want the user to be able to use my class
> just like a standard array. However, I want to be able to force some
> code to run every time a user of my class appends a new item. I was
> able to overload the '+' operator to do this but it doesn't fit with
> standard array usage.
It's generally not considered a good idea to overload. Consider using
Delegate instead.
-austin
--
Austin Ziegler * halostatue@xxxxxxxxx
* Alternate: austin@xxxxxxxxxxxxx
.
- Follow-Ups:
- Re: Operator Overloading <<
- From: Robert Klemme
- Re: Operator Overloading <<
- References:
- Operator Overloading <<
- From: matt.hulse@xxxxxxxxx
- Operator Overloading <<
- Prev by Date: Operator Overloading <<
- Next by Date: Re: IBM vs. Microsoft vs. ... Ruby?
- Previous by thread: Operator Overloading <<
- Next by thread: Re: Operator Overloading <<
- Index(es):
Relevant Pages
|