|
Bas de page | |
---|---|
Auteur | Sujet : Heritage Fonction abstraite, Probleme conteneur Heterogene |
![]() Publicité | Posté le 22-05-2006 à 16:24:26 ![]() ![]() |
bjone Insert booze to continue | heu dynamic_cast<> si tu veux rester avec une collection de IObject*, et pouvoir savoir si tu passer par un IOperand* (dynamic_cast<> te retournes un 0 si le cast est pas possible)
|
masklinn í dag viðrar vel til loftárása | Comme bjone, ici tu as défini que tu effectuais des opérations sur des IOperand, pas sur des IObject.
--------------- I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box by throwing away the limits imposed by overbearing genetic regulations? Isn't that a good thing? |
bjone Insert booze to continue | ou là wais j'avais pas vu le Add(const IOperand &object), c'est pet-gueule ça: il vaux mieux du Add(const IOperand *) quand tu manipules des objets virtuels. |
++fab victime du syndrome IH |
|
skelter |
++fab victime du syndrome IH |
|
masklinn í dag viðrar vel til loftárása |
--------------- I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box by throwing away the limits imposed by overbearing genetic regulations? Isn't that a good thing? |
skelter | et comment tu veux faire autrement ?? tu vas pas transformer tes paramettres en pointeurs sous pretexte que tu retourne un pointeur ? |
++fab victime du syndrome IH |
|
![]() Publicité | Posté le 22-05-2006 à 19:37:13 ![]() ![]() |
masklinn í dag viðrar vel til loftárása |
--------------- I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box by throwing away the limits imposed by overbearing genetic regulations? Isn't that a good thing? |
skelter | je vois pas ou est le probleme dans cet exemple, si il ne peut renvoyer autre chose qu'un pointeur je vois pas pour quoi il faudrais prendre un 'const IOperand *' en parametre |
skelter | d'ailleur 'const &' c'est absolument transparent dans le code appelant, ca pourait etre une valeur que ca ne changerais ni la syntaxe ni la sémantique |
bjone Insert booze to continue |
|
masklinn í dag viðrar vel til loftárása |
--------------- I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box by throwing away the limits imposed by overbearing genetic regulations? Isn't that a good thing? |
++fab victime du syndrome IH |
|
++fab victime du syndrome IH |
Message cité 1 fois Message édité par ++fab le 22-05-2006 à 20:29:33 |
masklinn í dag viðrar vel til loftárása |
--------------- I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box by throwing away the limits imposed by overbearing genetic regulations? Isn't that a good thing? |
++fab victime du syndrome IH | j'ai édité :| |
++fab victime du syndrome IH | alors c'est que tu considères qu'il est logique qu'une fonction qui "relaye" son paramètre, le relaye avec le même type. Mais je crois que ma réponse plus détaillé ci-cessus s'applique aussi dans ce cas. |
skelter | moi je demande des exemples, des citations, des references
|
loupin | alor, je suis tout a fait d accord que cé pa très logique de prendre un IOperand et de renvoyer un IObject mais le sujet est fait comme ca, je pense que c est fait expres. |
![]() Publicité | Posté le ![]() ![]() |
Sujets relatifs | |
---|---|
Biblio/Fonction C++ pour manipuler fichier (couper/coller) sous OSX | [RESOLU] [VB] Appel d'une fonction sur sélection d'une case |
probleme de lien | Problème avec IE pour un site fait sous powerpoint |
probleme de site en plusieurs langues | Problème de .conf apache |
Java -> Date, probleme d exception ?! | probleme upload |
Test de XQuery SAXON - Problème de Compilation | [C] Problème d'inclusion de type... |
Plus de sujets relatifs à : Heritage Fonction abstraite, Probleme conteneur Heterogene |