Click here to Skip to main content
15,917,473 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionguarantee to run in a certain period Pin
LeeeNN25-Oct-05 8:14
LeeeNN25-Oct-05 8:14 
AnswerRe: guarantee to run in a certain period Pin
Roger Stoltz25-Oct-05 9:03
Roger Stoltz25-Oct-05 9:03 
AnswerRe: guarantee to run in a certain period Pin
Joe Woodbury25-Oct-05 12:01
professionalJoe Woodbury25-Oct-05 12:01 
AnswerRe: guarantee to run in a certain period Pin
Roger Stoltz25-Oct-05 22:56
Roger Stoltz25-Oct-05 22:56 
GeneralRe: guarantee to run in a certain period Pin
Joe Woodbury26-Oct-05 0:22
professionalJoe Woodbury26-Oct-05 0:22 
QuestionDesign advice needed Pin
Keith Vitali25-Oct-05 8:03
Keith Vitali25-Oct-05 8:03 
AnswerRe: Design advice needed Pin
Achim Klein25-Oct-05 8:31
Achim Klein25-Oct-05 8:31 
AnswerRe: Design advice needed Pin
John R. Shaw25-Oct-05 9:03
John R. Shaw25-Oct-05 9:03 
Normaly initialization only needs to be done when the object if first created, at which point in time you already know what type it is. Given that, use an abstract base class that only provides the interfaces they have in common and provide each derived class with an initialization function specific for that class. Do not make the initialization function part of the base class, because it only provides the interface that you need to access after initialization.

If for some reason you need to reinitialize the object thru a pointer to the base class (unusual). You'll need to know what all the derive classes are so you can use dynamic_cast<>() to downcast the base class pointer to one of the derived types. At which time you will know what type it is and what paramenters are required.


INTP
Every thing is relative...
GeneralRe: Design advice needed Pin
Keith Vitali26-Oct-05 9:15
Keith Vitali26-Oct-05 9:15 
AnswerRe: Design advice needed Pin
Joe Woodbury25-Oct-05 12:06
professionalJoe Woodbury25-Oct-05 12:06 
AnswerRe: Design advice needed Pin
User 58385225-Oct-05 17:21
User 58385225-Oct-05 17:21 
QuestionMalloc / Free problem Pin
Jader8925-Oct-05 6:45
Jader8925-Oct-05 6:45 
AnswerRe: Malloc / Free problem Pin
Roger Stoltz25-Oct-05 7:01
Roger Stoltz25-Oct-05 7:01 
GeneralRe: Malloc / Free problem Pin
Jader8925-Oct-05 7:31
Jader8925-Oct-05 7:31 
AnswerRe: Malloc / Free problem Pin
Maximilien25-Oct-05 7:10
Maximilien25-Oct-05 7:10 
GeneralRe: Malloc / Free problem Pin
Jader8925-Oct-05 7:33
Jader8925-Oct-05 7:33 
QuestionRe: Malloc / Free problem Pin
David Crow25-Oct-05 7:27
David Crow25-Oct-05 7:27 
AnswerRe: Malloc / Free problem Pin
Jader8925-Oct-05 7:34
Jader8925-Oct-05 7:34 
QuestionRe: Malloc / Free problem Pin
David Crow25-Oct-05 9:27
David Crow25-Oct-05 9:27 
AnswerRe: Malloc / Free problem Pin
Jader8925-Oct-05 9:34
Jader8925-Oct-05 9:34 
AnswerRe: Malloc / Free problem Pin
Jader8925-Oct-05 9:39
Jader8925-Oct-05 9:39 
GeneralRe: Malloc / Free problem Pin
David Crow25-Oct-05 9:47
David Crow25-Oct-05 9:47 
QuestionRe: Malloc / Free problem Pin
Jader8925-Oct-05 11:00
Jader8925-Oct-05 11:00 
AnswerRe: Malloc / Free problem Pin
David Crow25-Oct-05 11:07
David Crow25-Oct-05 11:07 
GeneralRe: Malloc / Free problem Pin
Jader8925-Oct-05 11:20
Jader8925-Oct-05 11:20 

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.