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

C / C++ / MFC

 
GeneralRe: MACROS Pin
toxcct14-Feb-06 23:11
toxcct14-Feb-06 23:11 
GeneralRe: MACROS Pin
sunit514-Feb-06 23:15
sunit514-Feb-06 23:15 
GeneralRe: MACROS Pin
Rage15-Feb-06 0:21
professionalRage15-Feb-06 0:21 
GeneralRe: MACROS Pin
Nemanja Trifunovic15-Feb-06 7:47
Nemanja Trifunovic15-Feb-06 7:47 
AnswerRe: MACROS Pin
James R. Twine15-Feb-06 5:29
James R. Twine15-Feb-06 5:29 
AnswerRe: MACROS Pin
khan++14-Feb-06 22:56
khan++14-Feb-06 22:56 
AnswerRe: MACROS Pin
ThatsAlok14-Feb-06 23:34
ThatsAlok14-Feb-06 23:34 
AnswerRe: MACROS Pin
Gavin Taylor14-Feb-06 23:40
professionalGavin Taylor14-Feb-06 23:40 
#ifdef _DEBUG
Checks if this a DEBUG build, if it is tell the compiler to handle everything until it encounters an #endif, if it's not a debug build it just skips this section of the source file.

#define new DEBUG_NEW
DEBUG_NEW is a special version of new which stores extra information about the memory being allocated (file name and source line the allocation was made), all we're doing here is overriding the standard version of new.

#undef THIS_FILE<br />
static char THIS_FILE[] = __FILE__;

THIS_FILE stores a copy the current source file being executed, useful for debug messages etc, eg.
char buffer[ 255 ];
sprinf( buffer, "An error occured in source file %s", THIS_FILE );
printf( buffer );


#pragma once just tells the compiler to parse a header file once per source file, else you could end up with hundreds of error messages where stuffs getting defined twice.


Gavin Taylor
w: http://www.gavspace.com

QuestionCString Pin
Tony Kurishunkal14-Feb-06 22:06
Tony Kurishunkal14-Feb-06 22:06 
AnswerRe: CString Pin
toxcct14-Feb-06 22:09
toxcct14-Feb-06 22:09 
AnswerRe: CString Pin
khan++14-Feb-06 22:12
khan++14-Feb-06 22:12 
AnswerRe: CString Pin
ThatsAlok14-Feb-06 22:48
ThatsAlok14-Feb-06 22:48 
GeneralRe: CString Pin
Rob Caldecott14-Feb-06 23:38
Rob Caldecott14-Feb-06 23:38 
GeneralRe: CString Pin
ThatsAlok14-Feb-06 23:58
ThatsAlok14-Feb-06 23:58 
GeneralRe: CString Pin
Chintoo72315-Feb-06 2:15
Chintoo72315-Feb-06 2:15 
QuestionRe: CString Pin
David Crow15-Feb-06 3:55
David Crow15-Feb-06 3:55 
AnswerRe: CString Pin
James R. Twine15-Feb-06 7:02
James R. Twine15-Feb-06 7:02 
QuestionHelp in Remote Desktop Applications akka. VNC Pin
Girish60114-Feb-06 21:02
Girish60114-Feb-06 21:02 
GeneralRe: Help in Remote Desktop Applications akka. VNC Pin
Malli_S14-Feb-06 21:56
Malli_S14-Feb-06 21:56 
GeneralRe: Help in Remote Desktop Applications akka. VNC Pin
ThatsAlok14-Feb-06 22:46
ThatsAlok14-Feb-06 22:46 
GeneralRe: Help in Remote Desktop Applications akka. VNC Pin
Girish60114-Feb-06 22:53
Girish60114-Feb-06 22:53 
QuestionWhy my &quot;i&quot; counter doesn't increases? Pin
Rassul Yunussov14-Feb-06 20:56
Rassul Yunussov14-Feb-06 20:56 
AnswerRe: Why my &quot;i&quot; counter doesn't increases? Pin
Rage14-Feb-06 21:29
professionalRage14-Feb-06 21:29 
GeneralRe: Why my &quot;i&quot; counter doesn't increases? Pin
Rassul Yunussov14-Feb-06 21:54
Rassul Yunussov14-Feb-06 21:54 
GeneralRe: Why my &quot;i&quot; counter doesn't increases? Pin
Rage14-Feb-06 22:33
professionalRage14-Feb-06 22:33 

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.