Email address obfuscation in effect -- please
click here to turn it off.
[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
Hopefully at least some of you have done c or c++ programming in linux
before, anyway this is my first time doing so. I'm writing a 3d point
ADT in c++ and was overloading some of the operators. When I compile
what I have thus far I get errors on all the lines in my header file
about the operators. I'm using the command 'g++ -ggdb3 -Wall -o point3d
point3d.cpp' to compile it. The lines I'm getting the errors 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.? If everything I have is right, why is the
compiler giving me problems? Any input would be greatly appereciated.
Ryan Linneman
--
Debian, because It's GNU Not Unix.
--
To unsubscribe, go to http://mlug.missouri.edu/members/edit.php
Archives are available at http://mlug.missouri.edu/list-archives/