BTW, operator+ is usually implemented as a non-member function using the operator+= member function, like this:
#include <iostream>
class stellarobjekt{
double laenge, breite, hoehe;...
Type: Posts; User: oogabooga
BTW, operator+ is usually implemented as a non-member function using the operator+= member function, like this:
#include <iostream>
class stellarobjekt{
double laenge, breite, hoehe;...
That's strange because a normal method would not be allowed to have a + in the name.
Try calling it like this:
c1 = c1.operator+(c2);
Syntax highlighting is a function of your text editor and is completely unrelated to the compiler. Is your editor in C++ mode? It seems unlikely operator overloading would be broken.
Are you using...