Click here to Skip to main content
15,909,445 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Problem with Including new project's header file Pin
richardye30-Oct-07 21:26
richardye30-Oct-07 21:26 
GeneralRe: Problem with Including new project's header file Pin
ashishbhatt30-Oct-07 21:51
ashishbhatt30-Oct-07 21:51 
QuestionHow to make a tree of files? Pin
satw1430-Oct-07 17:05
satw1430-Oct-07 17:05 
AnswerRe: How to make a tree of files? Pin
Hamid_RT31-Oct-07 4:26
Hamid_RT31-Oct-07 4:26 
Questiona pointer question Pin
richardye30-Oct-07 15:44
richardye30-Oct-07 15:44 
AnswerRe: a pointer question Pin
User 58385230-Oct-07 17:03
User 58385230-Oct-07 17:03 
GeneralRe: a pointer question Pin
richardye30-Oct-07 18:56
richardye30-Oct-07 18:56 
AnswerRe: a pointer question Pin
Naveen30-Oct-07 17:05
Naveen30-Oct-07 17:05 
richardye wrote:
If I change 'Point * heap = new Point' to 'Point * heap', Isn't the source more effective?


Yes but in this case there should be a small change in the code. You should assign
the address of local to heap.
Point foobar()
{
Point local;
Point *heap = new Point;
*heap = local;

Point *heap = &local;
// ... stuff ...
delete heap;
return local;
}



richardye wrote:
But if I delete heap, will the call of default destructor be called?


Yes. But if you are modifying the code as i meantioned above you should not call delete.




GeneralRe: a pointer question Pin
Nishad S30-Oct-07 17:53
Nishad S30-Oct-07 17:53 
AnswerRe: a pointer question Pin
David Crow31-Oct-07 3:53
David Crow31-Oct-07 3:53 
QuestionConvert CImageList image to transparent GIF Pin
Neville Franks30-Oct-07 11:30
Neville Franks30-Oct-07 11:30 
AnswerRe: Convert CImageList image to transparent GIF Pin
Mark Salsbery30-Oct-07 12:14
Mark Salsbery30-Oct-07 12:14 
GeneralRe: Convert CImageList image to transparent GIF Pin
Neville Franks31-Oct-07 10:37
Neville Franks31-Oct-07 10:37 
GeneralRe: Convert CImageList image to transparent GIF Pin
Mark Salsbery31-Oct-07 10:49
Mark Salsbery31-Oct-07 10:49 
GeneralRe: Convert CImageList image to transparent GIF Pin
Mark Salsbery31-Oct-07 10:53
Mark Salsbery31-Oct-07 10:53 
GeneralRe: Convert CImageList image to transparent GIF Pin
Neville Franks31-Oct-07 11:07
Neville Franks31-Oct-07 11:07 
GeneralRe: Convert CImageList image to transparent GIF Pin
Mark Salsbery31-Oct-07 12:05
Mark Salsbery31-Oct-07 12:05 
GeneralRe: Convert CImageList image to transparent GIF Pin
Neville Franks31-Oct-07 21:32
Neville Franks31-Oct-07 21:32 
GeneralRe: Convert CImageList image to transparent GIF Pin
Mark Salsbery1-Nov-07 5:37
Mark Salsbery1-Nov-07 5:37 
GeneralRe: Convert CImageList image to transparent GIF Pin
Neville Franks1-Nov-07 23:13
Neville Franks1-Nov-07 23:13 
GeneralRe: Convert CImageList image to transparent GIF Pin
Neville Franks9-Nov-08 12:49
Neville Franks9-Nov-08 12:49 
GeneralRe: Convert CImageList image to transparent GIF Pin
Mark Salsbery10-Nov-08 4:56
Mark Salsbery10-Nov-08 4:56 
QuestionStruct memory allocation question Pin
thespiff30-Oct-07 10:34
thespiff30-Oct-07 10:34 
AnswerRe: Struct memory allocation question Pin
Mark Salsbery30-Oct-07 10:45
Mark Salsbery30-Oct-07 10:45 
GeneralRe: Struct memory allocation question Pin
led mike30-Oct-07 11:10
led mike30-Oct-07 11:10 

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.