Click here to Skip to main content
15,921,467 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionhow to duplicate object with type_info ? Pin
pedefetoll2-Sep-08 2:52
pedefetoll2-Sep-08 2:52 
AnswerRe: how to duplicate object with type_info ? Pin
Cedric Moonen2-Sep-08 3:02
Cedric Moonen2-Sep-08 3:02 
GeneralRe: how to duplicate object with type_info ? Pin
Gary R. Wheeler2-Sep-08 3:10
Gary R. Wheeler2-Sep-08 3:10 
GeneralRe: how to duplicate object with type_info ? Pin
Cedric Moonen2-Sep-08 3:14
Cedric Moonen2-Sep-08 3:14 
GeneralRe: how to duplicate object with type_info ? Pin
Gary R. Wheeler2-Sep-08 3:45
Gary R. Wheeler2-Sep-08 3:45 
GeneralRe: how to duplicate object with type_info ? Pin
pedefetoll9-Sep-08 0:24
pedefetoll9-Sep-08 0:24 
GeneralRe: how to duplicate object with type_info ? Pin
pedefetoll9-Sep-08 2:46
pedefetoll9-Sep-08 2:46 
GeneralRe: how to duplicate object with type_info ? Pin
Cedric Moonen10-Sep-08 5:57
Cedric Moonen10-Sep-08 5:57 
Hi, sorry for the late answer but I was in holidays.


marcelcerdanjunior wrote:
Only a small detail : all the Clone() methods needs to have the same return type. So it's necessary to cast the returned result :


Not necessarily, you can use a 'covariant return type', which means that your classB::Clone method can return a classB* (because classB inherits from classA). Anyway, you never need to cast classB into classA: classB IS already a classA object.

Cédric Moonen
Software developer

Charting control [v1.5]
OpenGL game tutorial in C++

Questionsetup package creation and deployment Pin
AnithaSubramani2-Sep-08 2:10
AnithaSubramani2-Sep-08 2:10 
AnswerRe: setup package creation and deployment Pin
_AnsHUMAN_ 2-Sep-08 2:13
_AnsHUMAN_ 2-Sep-08 2:13 
GeneralRe: setup package creation and deployment Pin
AnithaSubramani2-Sep-08 2:23
AnithaSubramani2-Sep-08 2:23 
GeneralRe: setup package creation and deployment Pin
_AnsHUMAN_ 2-Sep-08 2:49
_AnsHUMAN_ 2-Sep-08 2:49 
AnswerRe: setup package creation and deployment Pin
sashoalm2-Sep-08 5:57
sashoalm2-Sep-08 5:57 
GeneralRe: setup package creation and deployment Pin
AnithaSubramani3-Sep-08 20:19
AnithaSubramani3-Sep-08 20:19 
GeneralRe: setup package creation and deployment Pin
sashoalm3-Sep-08 20:59
sashoalm3-Sep-08 20:59 
GeneralRe: setup package creation and deployment Pin
AnithaSubramani4-Sep-08 0:43
AnithaSubramani4-Sep-08 0:43 
Questionsend message to view Pin
coding_ram2-Sep-08 2:06
coding_ram2-Sep-08 2:06 
AnswerRe: send message to view Pin
_AnsHUMAN_ 2-Sep-08 2:11
_AnsHUMAN_ 2-Sep-08 2:11 
GeneralRe: send message to view Pin
coding_ram2-Sep-08 2:56
coding_ram2-Sep-08 2:56 
QuestionTimer Pin
knowvc2-Sep-08 1:43
knowvc2-Sep-08 1:43 
AnswerRe: Timer Pin
Rane2-Sep-08 1:47
Rane2-Sep-08 1:47 
GeneralRe: Timer Pin
knowvc2-Sep-08 1:53
knowvc2-Sep-08 1:53 
QuestionRe: Timer Pin
David Crow2-Sep-08 3:35
David Crow2-Sep-08 3:35 
QuestionProlem of Access database Pin
Le@rner2-Sep-08 1:28
Le@rner2-Sep-08 1:28 
AnswerRe: Prolem of Access database Pin
Rane2-Sep-08 1:38
Rane2-Sep-08 1:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.