Search:

Type: Posts; User: oogabooga

Search: Search took 0.17 seconds.

  1. Replies
    41
    Views
    2,786

    BTW, operator+ is usually implemented as a...

    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;...
  2. Replies
    41
    Views
    2,786

    That's strange because a normal method would not...

    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);
  3. Replies
    41
    Views
    2,786

    Syntax highlighting is a function of your text...

    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...
Results 1 to 3 of 3