Click here to Skip to main content
15,899,026 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Getting rid of security questions when accessing registry Vista, Win 7 Pin
tibiz9-Mar-10 1:43
tibiz9-Mar-10 1:43 
GeneralRe: Getting rid of security questions when accessing registry Vista, Win 7 Pin
Mohan Ramachandra9-Mar-10 2:18
Mohan Ramachandra9-Mar-10 2:18 
GeneralRe: Getting rid of security questions when accessing registry Vista, Win 7 Pin
tibiz9-Mar-10 8:50
tibiz9-Mar-10 8:50 
GeneralRe: Getting rid of security questions when accessing registry Vista, Win 7 Pin
Mohan Ramachandra9-Mar-10 17:59
Mohan Ramachandra9-Mar-10 17:59 
QuestionCan't compile any code with Dev C++. Pin
James_7228-Mar-10 11:31
James_7228-Mar-10 11:31 
AnswerRe: Can't compile any code with Dev C++. Pin
Luc Pattyn8-Mar-10 12:40
sitebuilderLuc Pattyn8-Mar-10 12:40 
AnswerRe: Can't compile any code with Dev C++. Pin
Herboren8-Mar-10 15:40
Herboren8-Mar-10 15:40 
QuestionInitializer lists, default constructors and references Pin
CString(0xcccccccc)8-Mar-10 8:52
CString(0xcccccccc)8-Mar-10 8:52 
I have a class and a constructor taking a reference argument. I will use this argument to initialize a reference class member:

CMyClass::CMyClass(MyType& MyArg)
: class_member(MyArg)
{//...}

Ok, that's fine but there's a problem. Even though I don't need a default constructor, the compiler requires one. I must initialize the class_member reference in the initializer list. Because there are no arguments, I don't have a valid argument to make an initialization. NULL is not accepted by the compiler as a repacement. I wonder if there is a workaround.

I'm aware I can replace the reference with a pointer and eliminate the need to make the initialization in the initializer list, but I'm curious if there is any way to have a default constructor under the given conditions ?
AnswerRe: Initializer lists, default constructors and references Pin
Stuart Dootson8-Mar-10 9:01
professionalStuart Dootson8-Mar-10 9:01 
AnswerRe: Initializer lists, default constructors and references Pin
Graham Breach8-Mar-10 9:05
Graham Breach8-Mar-10 9:05 
GeneralRe: Initializer lists, default constructors and references Pin
CPallini8-Mar-10 9:23
mveCPallini8-Mar-10 9:23 
GeneralRe: Initializer lists, default constructors and references Pin
Tim Craig8-Mar-10 10:06
Tim Craig8-Mar-10 10:06 
GeneralRe: Initializer lists, default constructors and references Pin
Graham Breach8-Mar-10 10:19
Graham Breach8-Mar-10 10:19 
GeneralRe: Initializer lists, default constructors and references Pin
CPallini8-Mar-10 10:49
mveCPallini8-Mar-10 10:49 
GeneralRe: Initializer lists, default constructors and references Pin
Tim Craig8-Mar-10 13:53
Tim Craig8-Mar-10 13:53 
GeneralRe: Initializer lists, default constructors and references Pin
CString(0xcccccccc)8-Mar-10 9:30
CString(0xcccccccc)8-Mar-10 9:30 
AnswerRe: Initializer lists, default constructors and references [modified] Pin
Avi Berger8-Mar-10 9:27
Avi Berger8-Mar-10 9:27 
GeneralRe: Initializer lists, default constructors and references Pin
CString(0xcccccccc)8-Mar-10 9:40
CString(0xcccccccc)8-Mar-10 9:40 
GeneralRe: Initializer lists, default constructors and references Pin
Avi Berger8-Mar-10 10:08
Avi Berger8-Mar-10 10:08 
GeneralRe: Initializer lists, default constructors and references Pin
CString(0xcccccccc)8-Mar-10 10:40
CString(0xcccccccc)8-Mar-10 10:40 
GeneralRe: Initializer lists, default constructors and references Pin
Avi Berger8-Mar-10 11:08
Avi Berger8-Mar-10 11:08 
GeneralRe: Initializer lists, default constructors and references Pin
CString(0xcccccccc)8-Mar-10 20:19
CString(0xcccccccc)8-Mar-10 20:19 
AnswerRe: Initializer lists, default constructors and references Pin
CString(0xcccccccc)9-Mar-10 1:43
CString(0xcccccccc)9-Mar-10 1:43 
QuestionHow to keep DLL updated during development ? [modified] Pin
Vaclav_8-Mar-10 7:39
Vaclav_8-Mar-10 7:39 
AnswerRe: How to kee DLL updated during development ? Pin
Chris Losinger8-Mar-10 7:47
professionalChris Losinger8-Mar-10 7:47 

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.