Click here to Skip to main content
15,895,746 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Creating Global Objects Pin
led mike17-Apr-09 7:19
led mike17-Apr-09 7:19 
GeneralRe: Creating Global Objects Pin
ForNow18-Apr-09 15:42
ForNow18-Apr-09 15:42 
AnswerRe: Creating Global Objects Pin
Stuart Dootson17-Apr-09 9:01
professionalStuart Dootson17-Apr-09 9:01 
GeneralRe: Creating Global Objects Pin
CPallini17-Apr-09 9:12
mveCPallini17-Apr-09 9:12 
QuestionV-tables Pin
0x3c017-Apr-09 4:49
0x3c017-Apr-09 4:49 
AnswerRe: V-tables Pin
led mike17-Apr-09 5:49
led mike17-Apr-09 5:49 
GeneralRe: V-tables [modified] Pin
0x3c017-Apr-09 6:48
0x3c017-Apr-09 6:48 
GeneralRe: V-tables Pin
led mike17-Apr-09 7:02
led mike17-Apr-09 7:02 
Computafreak wrote:
In what way am I heading towards trouble?


The scope of that question is far to large to discuss in a forum which is why I referred you to other sources. However a quick couple of points I will provide are; 1) your notion of calling the base class method after the Bar method. Notice in my posted example the base class is called first. That is because in your posted code the Bar method frees the memory.

void DoSomething(void *p)
{
    if(p)
        free(p);
}


Calling the Foo method after that would result in the Foo method having an invalid pointer.

2) Also using void pointers is NOT Best Practice. Strongly Typed code is preferable.

Anyway all of these types of problems are covered in materials such as the ones I pointed you at. How do you think I know about them? I didn't invent anything you know, I learned from others. Wink | ;)
GeneralRe: V-tables Pin
0x3c018-Apr-09 6:01
0x3c018-Apr-09 6:01 
GeneralRe: V-tables Pin
led mike21-Apr-09 12:01
led mike21-Apr-09 12:01 
GeneralRe: V-tables Pin
0x3c022-Apr-09 6:26
0x3c022-Apr-09 6:26 
GeneralRe: V-tables Pin
led mike23-Apr-09 4:41
led mike23-Apr-09 4:41 
GeneralRe: V-tables Pin
0x3c023-Apr-09 5:15
0x3c023-Apr-09 5:15 
QuestionSetting the default icon in the registry Pin
Like2Byte17-Apr-09 4:43
Like2Byte17-Apr-09 4:43 
AnswerRe: Setting the default icon in the registry Pin
led mike17-Apr-09 4:49
led mike17-Apr-09 4:49 
QuestionWhy this error happens? How to resolve this ? (Repost : Modified, now the error is different) Pin
kapardhi17-Apr-09 2:55
kapardhi17-Apr-09 2:55 
AnswerRe: Why this error happens? How to resolve this ? (Repost : Modified, now the error is different) Pin
Stuart Dootson17-Apr-09 3:12
professionalStuart Dootson17-Apr-09 3:12 
QuestionRegistry access problem Pin
Mogaambo17-Apr-09 2:08
Mogaambo17-Apr-09 2:08 
AnswerRe: Registry access problem Pin
Jijo.Raj17-Apr-09 2:14
Jijo.Raj17-Apr-09 2:14 
GeneralRe: Registry access problem Pin
Mogaambo17-Apr-09 2:19
Mogaambo17-Apr-09 2:19 
GeneralRe: Registry access problem Pin
Mogaambo17-Apr-09 2:27
Mogaambo17-Apr-09 2:27 
GeneralRe: Registry access problem Pin
Cedric Moonen17-Apr-09 2:31
Cedric Moonen17-Apr-09 2:31 
Question[DirectX9.0]How to retrive vector from Camera setting's View Matrix Pin
kallol kumar17-Apr-09 2:04
kallol kumar17-Apr-09 2:04 
QuestionA question about Assert function Pin
Obsidianhom17-Apr-09 1:10
Obsidianhom17-Apr-09 1:10 
AnswerRe: A question about Assert function Pin
Cedric Moonen17-Apr-09 1:14
Cedric Moonen17-Apr-09 1:14 

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.