Click here to Skip to main content
16,005,467 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: message associted with number 131? Pin
Sunil Lanke16-Mar-09 0:55
Sunil Lanke16-Mar-09 0:55 
GeneralRe: message associted with number 131? Pin
Eytukan16-Mar-09 0:55
Eytukan16-Mar-09 0:55 
GeneralRe: message associted with number 131? Pin
Sunil Lanke16-Mar-09 0:53
Sunil Lanke16-Mar-09 0:53 
AnswerRe: message associted with number 131? Pin
Michael Schubert16-Mar-09 5:08
Michael Schubert16-Mar-09 5:08 
QuestionRegarding Dynamic memory allocation using stack pointer... Pin
p_196015-Mar-09 23:00
p_196015-Mar-09 23:00 
AnswerRe: Regarding Dynamic memory allocation using stack pointer... Pin
CPallini15-Mar-09 23:06
mveCPallini15-Mar-09 23:06 
AnswerRe: Regarding Dynamic memory allocation using stack pointer... Pin
Cedric Moonen15-Mar-09 23:10
Cedric Moonen15-Mar-09 23:10 
AnswerRe: Regarding Dynamic memory allocation using stack pointer... Pin
Eytukan15-Mar-09 23:32
Eytukan15-Mar-09 23:32 
There are two things, a pointer variable getting created in the stack and an object getting created in the heap. When you simply create a pointer, there's no need to delete it. Of course you shouldn't. Also even if you make it point to a heap,(That you allocate using "new",you need to delete the original heap manually only not all pointers pointing to it. Also remember, when you delete the duplicate pointer, it actually deletes the object in the heap.
An example for you :
void main()
{
int* pInt = new int(100);

    {
      int* pX = pInt;
     //Here you don't need to delete pX;//You shouldn't
    }

delete pInt; //Delete here
pInt=NULL;
}


Another example, If both the pointer remains in the same scope:

int* pX = new int(100);
int* pY = pX;

delete Px;
Px=NULL;
//Here you may just assign NULL to pY;
pY=NULL;

So you get the difference between an empty pointer and original one that points to heap?

He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus

Questionvisual c++6.0 how to play mov mpeg swf file format without using activeXcontrol Pin
dimasfitria15-Mar-09 22:00
dimasfitria15-Mar-09 22:00 
AnswerRe: visual c++6.0 how to play mov mpeg swf file format without using activeXcontrol Pin
Eytukan15-Mar-09 22:29
Eytukan15-Mar-09 22:29 
GeneralRe: visual c++6.0 how to play mov mpeg swf file format without using activeXcontrol Pin
Hamid_RT15-Mar-09 23:04
Hamid_RT15-Mar-09 23:04 
GeneralRe: visual c++6.0 how to play mov mpeg swf file format without using activeXcontrol Pin
Eytukan16-Mar-09 0:03
Eytukan16-Mar-09 0:03 
GeneralRe: visual c++6.0 how to play mov mpeg swf file format without using activeXcontrol Pin
dimasfitria15-Mar-09 23:18
dimasfitria15-Mar-09 23:18 
GeneralRe: visual c++6.0 how to play mov mpeg swf file format without using activeXcontrol Pin
Cedric Moonen16-Mar-09 0:18
Cedric Moonen16-Mar-09 0:18 
GeneralRe: visual c++6.0 how to play mov mpeg swf file format without using activeXcontrol Pin
dimasfitria16-Mar-09 15:57
dimasfitria16-Mar-09 15:57 
AnswerRe: visual c++6.0 how to play mov mpeg swf file format without using activeXcontrol Pin
Hamid_RT15-Mar-09 23:02
Hamid_RT15-Mar-09 23:02 
GeneralRe: visual c++6.0 how to play mov mpeg swf file format without using activeXcontrol Pin
dimasfitria15-Mar-09 23:34
dimasfitria15-Mar-09 23:34 
GeneralRe: visual c++6.0 how to play mov mpeg swf file format without using activeXcontrol Pin
Hamid_RT15-Mar-09 23:41
Hamid_RT15-Mar-09 23:41 
GeneralRe: visual c++6.0 how to play mov mpeg swf file format without using activeXcontrol Pin
Eytukan15-Mar-09 23:55
Eytukan15-Mar-09 23:55 
GeneralRe: visual c++6.0 how to play mov mpeg swf file format without using activeXcontrol Pin
Eytukan16-Mar-09 0:00
Eytukan16-Mar-09 0:00 
QuestionWhat does it mean by "application" in this context? Pin
cs6008915-Mar-09 21:55
cs6008915-Mar-09 21:55 
AnswerRe: What does it mean by "application" in this context? Pin
Eytukan15-Mar-09 22:00
Eytukan15-Mar-09 22:00 
GeneralRe: What does it mean by "application" in this context? Pin
cs6008915-Mar-09 23:44
cs6008915-Mar-09 23:44 
GeneralRe: What does it mean by "application" in this context? Pin
Eytukan15-Mar-09 23:49
Eytukan15-Mar-09 23:49 
GeneralRe: What does it mean by "application" in this context? Pin
cs6008916-Mar-09 0:09
cs6008916-Mar-09 0:09 

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.