MLUG: RE: [MLUG] C/C++ programming in Linux
RE: [MLUG] C/C++ programming in Linux
Email address obfuscation in effect -- please click here to turn it off.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

On Tue, 2 Apr 2002, Ross, Matt wrote:

> > on are like
> >     point3d operator+(const point3d&, const point3d&) const;
> > and the error I'm getting from g++ is
> >     `point3d::operator+(const point3d&, const point3d&)' must take 
> > either zero or one argument
> > when I change the line to be
> >     point3d operator+(const point3d&) const;
> > everything compiles fine. My questions are, is this something 
> > I'm doing 
> > wrong, if so then what.?  
> 
> point3d operator+(const point3d&, const point3d&) 
> "must take either zero or one argument" - your giving it two args, thats why
> its fussing.  I've not done it in a while, so I don't remember how to force
> it to accept two, if you can at all.  I think you need to make a function to
> do it rather than an overloaded operator.

Yes, I don't understand how you expect to use a operator+ with two
agruments.

Ian Monroe
http://ian.webhop.org



--
To unsubscribe, go to http://mlug.missouri.edu/members/edit.php

Archives are available at http://mlug.missouri.edu/list-archives/