Click here to Skip to main content
15,898,991 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
CString(0xcccccccc) wrote:
I don't need a default constructor, the compiler requires one.


Actually, the compiler should not require one, unless something in your code (like a library as Stuart Dootson suggested) is triggering the compiler to use one. If you are getting errors due to its absence, that means that it is getting used. You either need to track down those locations and change them so that the default constructor is not used or make your class default constructable.

If you declare a private default constructor but do not provide an implementation for it (as Graham Breach suggested), it should make most of those situations compiler rather than linker errors. This should make it easier to locate them.
Please do not read this signature.
modified on Monday, March 8, 2010 3:40 PM

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 
GeneralRe: How to kee DLL updated during development ? Pin
CPallini8-Mar-10 7:51
mveCPallini8-Mar-10 7:51 
GeneralRe: How to kee DLL updated during development ? Pin
Vaclav_8-Mar-10 7:51
Vaclav_8-Mar-10 7:51 
GeneralRe: How to kee DLL updated during development ? Pin
CPallini8-Mar-10 7:53
mveCPallini8-Mar-10 7:53 
GeneralRe: How to kee DLL updated during development ? Pin
jeron18-Mar-10 8:28
jeron18-Mar-10 8:28 
GeneralRe: How to kee DLL updated during development ? Pin
Tim Craig8-Mar-10 10:10
Tim Craig8-Mar-10 10:10 
GeneralRe: How to kee DLL updated during development ? Pin
CPallini8-Mar-10 10:47
mveCPallini8-Mar-10 10:47 
GeneralRe: How to kee DLL updated during development ? Pin
Tim Craig8-Mar-10 13:55
Tim Craig8-Mar-10 13:55 
GeneralRe: How to kee DLL updated during development ? Pin
Vaclav_8-Mar-10 17:36
Vaclav_8-Mar-10 17:36 
AnswerRe: How to keep DLL updated during development ? Pin
Chris Losinger8-Mar-10 8:28
professionalChris Losinger8-Mar-10 8:28 

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.