Click here to Skip to main content
15,888,351 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalconstructor implementation question Pin
nss24-Jan-04 8:20
nss24-Jan-04 8:20 
GeneralRe: constructor implementation question Pin
bneacetp24-Jan-04 15:05
bneacetp24-Jan-04 15:05 
GeneralRe: constructor --thanks! Pin
nss24-Jan-04 16:37
nss24-Jan-04 16:37 
GeneralRe: constructor --thanks! Pin
bneacetp24-Jan-04 17:59
bneacetp24-Jan-04 17:59 
GeneralATL ActiveX > .NET Pin
dabossuk24-Jan-04 6:21
dabossuk24-Jan-04 6:21 
GeneralOverloading the = operator Pin
magpierre24-Jan-04 5:37
magpierre24-Jan-04 5:37 
GeneralRe: Overloading the = operator Pin
J. Eric Vaughan24-Jan-04 6:04
J. Eric Vaughan24-Jan-04 6:04 
GeneralRe: Overloading the = operator Pin
Jörgen Sigvardsson24-Jan-04 6:04
Jörgen Sigvardsson24-Jan-04 6:04 
Your operator= method is flawed in many ways. The most notable flaw is that you are returning a dangling reference. You return a reference to a temporary object - an object which is dead after the operator= has returned.

Second, a operator= should return *this so that you do not break the syntax and semantics of obj1 = obj2 = obj3 /* and so on */ ;


As for your error message: Obviously you do not have a CZone(CString, const CArray*) or CZone(const CString&, const CArray*) constructor. Your parameter, zone is const. Hence zone.nomZone and zone.composantsZone are const too.

--
C'est normal!
GeneralC++ Question. Pin
WREY24-Jan-04 4:42
WREY24-Jan-04 4:42 
GeneralRe: C++ Question. Pin
Jörgen Sigvardsson24-Jan-04 5:09
Jörgen Sigvardsson24-Jan-04 5:09 
GeneralRe: C++ Question. Pin
WREY24-Jan-04 5:56
WREY24-Jan-04 5:56 
GeneralRe: C++ Question. Pin
PJ Arends24-Jan-04 9:35
professionalPJ Arends24-Jan-04 9:35 
GeneralRe: C++ Question. Pin
MrNiceBerG24-Jan-04 5:25
MrNiceBerG24-Jan-04 5:25 
GeneralRe: C++ Question. Pin
Jörgen Sigvardsson24-Jan-04 5:59
Jörgen Sigvardsson24-Jan-04 5:59 
GeneralRe: C++ Question. Pin
WREY24-Jan-04 6:04
WREY24-Jan-04 6:04 
GeneralRe: C++ Question. Pin
Michael Dunn24-Jan-04 6:13
sitebuilderMichael Dunn24-Jan-04 6:13 
GeneralRe: C++ Question. Pin
Jörgen Sigvardsson24-Jan-04 9:42
Jörgen Sigvardsson24-Jan-04 9:42 
GeneralRe: C++ Question. Pin
Inam24-Jan-04 6:57
Inam24-Jan-04 6:57 
GeneralRe: C++ Question. Pin
WREY25-Jan-04 0:22
WREY25-Jan-04 0:22 
GeneralRe: C++ Question. Pin
wb25-Jan-04 4:48
wb25-Jan-04 4:48 
GeneralRe: C++ Question. Pin
Gerald Schwab25-Jan-04 16:29
Gerald Schwab25-Jan-04 16:29 
GeneralRe: C++ Question. Pin
toxcct25-Jan-04 22:58
toxcct25-Jan-04 22:58 
GeneralRe: C++ Question. Pin
WREY26-Jan-04 3:58
WREY26-Jan-04 3:58 
GeneralRe: C++ Question. Pin
toxcct26-Jan-04 6:35
toxcct26-Jan-04 6:35 
GeneralRe: C++ Question. Pin
WREY26-Jan-04 10:14
WREY26-Jan-04 10:14 

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.