Click here to Skip to main content
15,921,028 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralConstructor & Destructor Pin
Makover28-Mar-03 6:08
Makover28-Mar-03 6:08 
GeneralRe: Constructor & Destructor Pin
Chris Losinger28-Mar-03 6:11
professionalChris Losinger28-Mar-03 6:11 
GeneralRe: Constructor & Destructor Pin
Daniel Turini28-Mar-03 6:20
Daniel Turini28-Mar-03 6:20 
GeneralRe: Constructor & Destructor Pin
Makover28-Mar-03 6:37
Makover28-Mar-03 6:37 
GeneralRe: Constructor & Destructor Pin
Maximilien28-Mar-03 6:49
Maximilien28-Mar-03 6:49 
GeneralRe: Constructor & Destructor Pin
Alvaro Mendez28-Mar-03 8:18
Alvaro Mendez28-Mar-03 8:18 
GeneralRe: Constructor & Destructor Pin
Tim Smith28-Mar-03 7:25
Tim Smith28-Mar-03 7:25 
GeneralRe: Constructor & Destructor Pin
jbarton28-Mar-03 7:36
jbarton28-Mar-03 7:36 
While you can skip the initialization list and do all of the initialization in the body of the constructor, it is actually a good habit to get into to try to initialize anything that you can using the initializer list.
It doesn't make any difference for simple data types (ints, doubles, etc), but if you have any member variables which have default constructors and also need to be initialized to some value, you end up doing extra work. The compiler will call the default constructor for any members which aren't listed in the initializer list, and then you will assign a value to the member in the body of the constructor.
GeneralBuild like Visual Studio Pin
calgonit28-Mar-03 5:48
calgonit28-Mar-03 5:48 
GeneralOutlook Automation :-( ( attachment) Pin
Braulio Dez28-Mar-03 5:28
Braulio Dez28-Mar-03 5:28 
GeneralSolution... sh*tty automation Pin
Braulio Dez28-Mar-03 5:47
Braulio Dez28-Mar-03 5:47 
Generaldialog editor question (fine tuning the position of one control) Pin
Joan M28-Mar-03 5:21
professionalJoan M28-Mar-03 5:21 
GeneralRe: dialog editor question (fine tuning the position of one control) Pin
Big Art28-Mar-03 5:33
Big Art28-Mar-03 5:33 
GeneralRe: dialog editor question (fine tuning the position of one control) Pin
Joan M28-Mar-03 5:39
professionalJoan M28-Mar-03 5:39 
GeneralRe: dialog editor question (fine tuning the position of one control) Pin
Big Art28-Mar-03 5:57
Big Art28-Mar-03 5:57 
GeneralRe: dialog editor question (fine tuning the position of one control) Pin
Joan M28-Mar-03 6:15
professionalJoan M28-Mar-03 6:15 
GeneralRe: dialog editor question (fine tuning the position of one control) Pin
Big Art28-Mar-03 6:51
Big Art28-Mar-03 6:51 
GeneralRe: dialog editor question (fine tuning the position of one control) Pin
Joan M28-Mar-03 7:05
professionalJoan M28-Mar-03 7:05 
GeneralRe: dialog editor question (fine tuning the position of one control) Pin
Big Art28-Mar-03 7:19
Big Art28-Mar-03 7:19 
GeneralRe: dialog editor question (fine tuning the position of one control) Pin
Joan M28-Mar-03 7:27
professionalJoan M28-Mar-03 7:27 
GeneralMutual exclusion Pin
act_x28-Mar-03 5:20
act_x28-Mar-03 5:20 
GeneralRe: Mutual exclusion Pin
Neville Franks28-Mar-03 10:08
Neville Franks28-Mar-03 10:08 
GeneralWindows Registry blues Pin
fd975028-Mar-03 5:02
professionalfd975028-Mar-03 5:02 
GeneralRe: Windows Registry blues Pin
Chris Losinger28-Mar-03 5:20
professionalChris Losinger28-Mar-03 5:20 
GeneralRe: Windows Registry blues Pin
Big Art28-Mar-03 5:22
Big Art28-Mar-03 5:22 

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.