Re: Delegating to a Contained PartsList

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

 



corey taylor wrote:

Morten,

 You should also define a return type for that operator function.

corey


On Fri, 11 Feb 2005 08:53:58 +0100, Morten.Gulbrandsen
<f1000mhz@xxxxxxxx> wrote:


4eList1605_UNIX.cpp:275:
error:
ISO C++ forbids declaration of `operator+' with no type







This fixed the code

/*!!****************************************************************/

 int    operator+(const PartsCatalog &); //  int appended

 /*****************************************************************/

void ShowAll() { thePartsList.Iterate(&Part::Display); } // & appended

/**************************************!!***************************/



Thanx to both of you,

Don't know if this is real delegation,   obviously the code was buggy.

For a beginner like me,
it is very difficult to see what  must be done.

It is now fixed and produces correct results.


Yours Sincerely

Morten Gulbrandsen





[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux