Jump to content

Recommended Posts

Posted (edited)

boas, tenho o seguinte pedaço de codigo:

no ponto.h

Tipos* _listas[10];

e adicionei elementes assim:

_listas[0] = (TipoA*) new TipoA(0,-50,0);
_listas[1] = (TipoB*) new TipoB(0,20,0);
_listas[2] = (TipoB*) new TipoB(-20,20,0);
_listas[3] = (TipoB*) new TipoB(20,20,0);

como é que eu consigo aceder ao _listas[0] para executar uma funcao que apenas percence ao tipo A? :/

obrigado

Edited by pmg
Falta LP no GeSHi

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.