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

C / C++ / MFC

 
GeneralRe: new ClassX() versus new ClassX syntax Pin
Jörgen Sigvardsson23-Sep-05 7:39
Jörgen Sigvardsson23-Sep-05 7:39 
AnswerRe: new ClassX() versus new ClassX syntax Pin
Alexander M.,23-Sep-05 7:49
Alexander M.,23-Sep-05 7:49 
AnswerRe: new ClassX() versus new ClassX syntax Pin
toxcct23-Sep-05 7:50
toxcct23-Sep-05 7:50 
GeneralRe: new ClassX() versus new ClassX syntax Pin
Jörgen Sigvardsson23-Sep-05 10:55
Jörgen Sigvardsson23-Sep-05 10:55 
GeneralRe: new ClassX() versus new ClassX syntax [modified] Pin
ddmcr23-Sep-05 10:58
ddmcr23-Sep-05 10:58 
GeneralRe: new ClassX() versus new ClassX syntax [modified] Pin
toxcct24-Sep-05 5:40
toxcct24-Sep-05 5:40 
GeneralRe: new ClassX() versus new ClassX syntax [modified] Pin
ddmcr24-Sep-05 8:58
ddmcr24-Sep-05 8:58 
GeneralRe: new ClassX() versus new ClassX syntax [modified] Pin
Jörgen Sigvardsson25-Sep-05 0:17
Jörgen Sigvardsson25-Sep-05 0:17 
Then that is a compiler specific detail. It's not in the standard! The Visual C++ compiler for instance, initializes all members to seemingly "garbage" values in debug mode. The garbage however, is useful, as it gives the programmer a good hint on what is wrong (uninitialized variables are easily detected). IIRC, the compiler initializes member variables with byte strings containing repeating the pattern 0xcd. Members of deleted objects are given 0xfe.

I wouldn't rely on this behaviour, because it's probably subject to change with any release, and it is not portable.

--
Keep talking! You're the fool, I'm the preacher.
GeneralRe: new ClassX() versus new ClassX syntax [modified] Pin
ddmcr25-Sep-05 7:27
ddmcr25-Sep-05 7:27 
QuestionRecord sound Pin
bulgaa23-Sep-05 4:19
bulgaa23-Sep-05 4:19 
AnswerRe: Record sound Pin
Alexander M.,24-Sep-05 8:59
Alexander M.,24-Sep-05 8:59 
QuestionCoInitializeEx and failure about document establishes Pin
Tcpip200523-Sep-05 3:47
Tcpip200523-Sep-05 3:47 
QuestionBSTR to char[] Pin
Eytukan23-Sep-05 3:40
Eytukan23-Sep-05 3:40 
AnswerRe: BSTR to char[] Pin
Phil J Pearson23-Sep-05 4:06
Phil J Pearson23-Sep-05 4:06 
AnswerRe: BSTR to char[] Pin
prasad_som23-Sep-05 4:14
prasad_som23-Sep-05 4:14 
Answernot done :( Pin
Eytukan23-Sep-05 4:21
Eytukan23-Sep-05 4:21 
AnswerRe: BSTR to char[] Pin
Kharfax23-Sep-05 9:01
Kharfax23-Sep-05 9:01 
Questionoffscreen GUI Pin
JChui23-Sep-05 2:59
JChui23-Sep-05 2:59 
QuestionInsert at Cursor position in CEdit Pin
vikas amin23-Sep-05 2:20
vikas amin23-Sep-05 2:20 
AnswerRe: Insert at Cursor position in CEdit Pin
vikas amin23-Sep-05 2:21
vikas amin23-Sep-05 2:21 
AnswerRe: Insert at Cursor position in CEdit Pin
Chris Losinger23-Sep-05 2:23
professionalChris Losinger23-Sep-05 2:23 
GeneralRe: Insert at Cursor position in CEdit Pin
vikas amin23-Sep-05 2:54
vikas amin23-Sep-05 2:54 
GeneralRe: Insert at Cursor position in CEdit Pin
David Crow23-Sep-05 3:27
David Crow23-Sep-05 3:27 
GeneralRe: Insert at Cursor position in CEdit Pin
Eytukan23-Sep-05 3:50
Eytukan23-Sep-05 3:50 
GeneralRe: Insert at Cursor position in CEdit Pin
Eytukan23-Sep-05 2:54
Eytukan23-Sep-05 2:54 

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.