Click here to Skip to main content
15,899,475 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
How can i set deleted pointer value to NULL but not to 0xfeeefeee as i know Heapfree
objects are set to 0xfeeefeee in microsoft visual studio.

my problem is here:
C++
EXClass *pcClass = new EXClass ();

................
................

if (pcClass)
  { delete pcClass ; pcClass = NULL; } // Iam deleting class pointer here.

...............
...............

if (pcClass) // pcClass is having 0xfeeefeee and going to if and crashing here
 { // perform some action }
else
 { return; }

Any solution for this.
How can i get rid of 0xfeeefeee
Posted
Updated 11-May-12 22:20pm
v3

1 solution

The problem is that you are trying to use a pointer that has not been initialised, so you need to fix that bug in your code rather than trying to work round it.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900