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

C / C++ / MFC

 
GeneralRe: pointer to char array Pin
Steen Krogsgaard22-Sep-05 23:18
Steen Krogsgaard22-Sep-05 23:18 
GeneralRe: pointer to char array Pin
ThatsAlok22-Sep-05 23:21
ThatsAlok22-Sep-05 23:21 
GeneralRe: pointer to char array Pin
Steen Krogsgaard22-Sep-05 23:23
Steen Krogsgaard22-Sep-05 23:23 
GeneralRe: pointer to char array Pin
ThatsAlok22-Sep-05 23:47
ThatsAlok22-Sep-05 23:47 
Questionwhy pure virtual function is needed Pin
aloktambi22-Sep-05 19:54
aloktambi22-Sep-05 19:54 
AnswerRe: why pure virtual function is needed Pin
Cedric Moonen22-Sep-05 20:04
Cedric Moonen22-Sep-05 20:04 
GeneralRe: why pure virtual function is needed Pin
Roger Stoltz22-Sep-05 21:16
Roger Stoltz22-Sep-05 21:16 
AnswerRe: why pure virtual function is needed Pin
Rick York22-Sep-05 21:00
mveRick York22-Sep-05 21:00 
Here's an example of something I did with an abstract base class. This class was a thread class that would start up the thread. It was its own class because that would allow derived instances of it to have their own set of properties and capabilities in addition to those supplied by the base class. The pure virtual methd of the class is the thread procedure itself. One makes their own thread objects by deriving from this base class and implementing the thread procedure method. Other methods are available to create the thread, to initialize it, and to clean up after it. Each of those mentioned are virtual to allow them to be overridden but they also have default implementations. In the case of the thread procedure method a thread is useless without one so making it a pure virtual method requires all derived class to provide an implementation of it.

Does this makes sense ?

BTW - about this thread class, normally class methods can't be used as thread procedures but these threads use a static member method as the thread procedure and its argument is the this pointer of the thread object. The static member method calls the derived class' thread procedure method.

AnswerRe: why pure virtual function is needed Pin
MailtoGops22-Sep-05 21:16
MailtoGops22-Sep-05 21:16 
AnswerRe: why pure virtual function is needed Pin
vikas amin23-Sep-05 2:12
vikas amin23-Sep-05 2:12 
Questionpointer to char array Pin
Rupali sarda22-Sep-05 19:48
Rupali sarda22-Sep-05 19:48 
AnswerRe: pointer to char array Pin
Calc2022-Sep-05 19:59
Calc2022-Sep-05 19:59 
AnswerRe: pointer to char array Pin
Cedric Moonen22-Sep-05 20:05
Cedric Moonen22-Sep-05 20:05 
AnswerRe: pointer to char array Pin
sunit522-Sep-05 20:12
sunit522-Sep-05 20:12 
AnswerRe: pointer to char array Pin
ThatsAlok22-Sep-05 22:52
ThatsAlok22-Sep-05 22:52 
GeneralRe: pointer to char array Pin
Eytukan22-Sep-05 23:03
Eytukan22-Sep-05 23:03 
QuestionHOW TO OVERRIDE SINGLE CLICK MESSAGE FOR AN EDIT BOX. Pin
rajeev8222-Sep-05 19:39
rajeev8222-Sep-05 19:39 
AnswerRe: HOW TO OVERRIDE SINGLE CLICK MESSAGE FOR AN EDIT BOX. Pin
Calc2022-Sep-05 19:56
Calc2022-Sep-05 19:56 
QuestionProcess Synchronization Pin
Steve Chang22-Sep-05 19:25
Steve Chang22-Sep-05 19:25 
QuestionVMR Sample compile error Pin
Cindy197822-Sep-05 18:36
Cindy197822-Sep-05 18:36 
QuestionAbout how to change paper size when you are about to print Pin
lionheart16322-Sep-05 16:19
lionheart16322-Sep-05 16:19 
Questionhelp in shape extraction from images Pin
bhamaimrith22-Sep-05 16:14
bhamaimrith22-Sep-05 16:14 
Questionhow do I print a string with " " " in it Pin
Spiritofamerica22-Sep-05 14:08
Spiritofamerica22-Sep-05 14:08 
AnswerRe: how do I print a string with " " " in it Pin
Shog922-Sep-05 14:26
sitebuilderShog922-Sep-05 14:26 
Questiontrim? Pin
kerrywes22-Sep-05 12:42
kerrywes22-Sep-05 12:42 

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.