Re: Two errors creating a converter between two types

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

 



Hi tirengarfio,

You are making a cast operator.

Cast operators have no parameters, hence they are 'void'.

So your int parameter is not allowed.

What would that look like, anyway, when used...

CEntrada* ptr = (CEntrada*) taquilla (7);

...?  Can't be that, since that's not a cast operator.

Must be (although still invalid)...

CEntrada* ptr = taquilla.operator CEntrada*(7);

...which rather defeats the purpose of a cast operator.

Probably should make an accessor:

  CEntrada* GetEntradaPtr(int i);

Or:

  CEntrada* operator [] (int i);

HTH,
--Eljay


[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