Click here to Skip to main content
15,904,638 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Compiler job Pin
Malli_S25-Jul-12 23:10
Malli_S25-Jul-12 23:10 
AnswerRe: Compiler job Pin
_Flaviu26-Jul-12 1:21
_Flaviu26-Jul-12 1:21 
QuestionIs there a reason you would initialise variables like this? Pin
MarkB77725-Jul-12 1:33
MarkB77725-Jul-12 1:33 
AnswerRe: Is there a reason you would initialise variables like this? PinPopular
_AnsHUMAN_ 25-Jul-12 1:47
_AnsHUMAN_ 25-Jul-12 1:47 
GeneralRe: Is there a reason you would initialise variables like this? Pin
jschell25-Jul-12 6:40
jschell25-Jul-12 6:40 
GeneralRe: Is there a reason you would initialise variables like this? Pin
Philippe Mori25-Jul-12 10:37
Philippe Mori25-Jul-12 10:37 
GeneralRe: Is there a reason you would initialise variables like this? Pin
jschell27-Jul-12 11:38
jschell27-Jul-12 11:38 
GeneralRe: Is there a reason you would initialise variables like this? Pin
Philippe Mori27-Jul-12 13:08
Philippe Mori27-Jul-12 13:08 
At this time, I program mainly in C# and in that case meber are initialized to (as member of a ref class would also be initialized in C++/CLI).

As far as I can tell, you have misunderstood the standard. A static member will be initialized to 0 but not a regiular member in the general case.

I have found many link that confirm what I have said.

http://www.cplusplus.com/forum/general/17582/[^]

http://stackoverflow.com/questions/1069621/are-members-of-a-c-struct-initialized-to-0-by-default[^]

http://stackoverflow.com/questions/2614809/what-is-the-default-value-for-c-class-members[^]

http://msdn.microsoft.com/en-us/library/s0wk5dy9.aspx[^]
Philippe Mori

GeneralRe: Is there a reason you would initialise variables like this? Pin
jschell28-Jul-12 6:13
jschell28-Jul-12 6:13 
GeneralRe: Is there a reason you would initialise variables like this? Pin
w-peuker26-Jul-12 21:21
w-peuker26-Jul-12 21:21 
GeneralRe: Is there a reason you would initialise variables like this? Pin
jschell27-Jul-12 11:40
jschell27-Jul-12 11:40 
GeneralRe: Is there a reason you would initialise variables like this? Pin
Philippe Mori27-Jul-12 13:10
Philippe Mori27-Jul-12 13:10 
GeneralRe: Is there a reason you would initialise variables like this? Pin
jschell28-Jul-12 6:14
jschell28-Jul-12 6:14 
AnswerRe: Is there a reason you would initialise variables like this? Pin
Richard MacCutchan25-Jul-12 1:52
mveRichard MacCutchan25-Jul-12 1:52 
AnswerRe: Is there a reason you would initialise variables like this? PinPopular
George L. Jackson25-Jul-12 7:07
George L. Jackson25-Jul-12 7:07 
GeneralRe: Is there a reason you would initialise variables like this? Pin
MarkB77725-Jul-12 22:45
MarkB77725-Jul-12 22:45 
GeneralRe: Is there a reason you would initialise variables like this? Pin
w-peuker26-Jul-12 21:30
w-peuker26-Jul-12 21:30 
AnswerRe: Is there a reason you would initialise variables like this? Pin
Eugen Podsypalnikov25-Jul-12 7:42
Eugen Podsypalnikov25-Jul-12 7:42 
AnswerRe: Is there a reason you would initialise variables like this? Pin
Malli_S25-Jul-12 20:58
Malli_S25-Jul-12 20:58 
QuestionShellExecute() launch .CHM and PDF file not work in Window 7 Pin
Andraw11124-Jul-12 7:31
Andraw11124-Jul-12 7:31 
QuestionRe: ShellExecute() launch .CHM and PDF file not work in Window 7 Pin
David Crow24-Jul-12 8:06
David Crow24-Jul-12 8:06 
AnswerRe: ShellExecute() launch .CHM and PDF file not work in Window 7 Pin
Andraw11124-Jul-12 8:13
Andraw11124-Jul-12 8:13 
GeneralRe: ShellExecute() launch .CHM and PDF file not work in Window 7 Pin
enhzflep24-Jul-12 8:28
enhzflep24-Jul-12 8:28 
GeneralRe: ShellExecute() launch .CHM and PDF file not work in Window 7 Pin
Andraw11124-Jul-12 8:51
Andraw11124-Jul-12 8:51 
GeneralRe: ShellExecute() launch .CHM and PDF file not work in Window 7 Pin
enhzflep24-Jul-12 9:07
enhzflep24-Jul-12 9:07 

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.