Click here to Skip to main content
15,890,186 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Setting modem properties Pin
Krishnan V5-Apr-06 19:25
Krishnan V5-Apr-06 19:25 
QuestionFTP Server Pin
Ahuja Ekta1-Apr-06 0:11
Ahuja Ekta1-Apr-06 0:11 
Questionregistry available to any user Pin
RomTibi31-Mar-06 23:43
RomTibi31-Mar-06 23:43 
AnswerRe: registry available to any user Pin
Stephen Hewitt1-Apr-06 0:42
Stephen Hewitt1-Apr-06 0:42 
GeneralRe: registry available to any user Pin
RomTibi1-Apr-06 5:19
RomTibi1-Apr-06 5:19 
GeneralRe: registry available to any user Pin
Michael Dunn1-Apr-06 6:10
sitebuilderMichael Dunn1-Apr-06 6:10 
AnswerRe: registry available to any user Pin
Michael Dunn1-Apr-06 6:10
sitebuilderMichael Dunn1-Apr-06 6:10 
QuestionDeriving from CObject and using = operator Pin
Dr-Kuulun31-Mar-06 23:23
Dr-Kuulun31-Mar-06 23:23 
Hello,

how is the = operator to be implemented in a class derived from CObject?

I derived two classes with one element inside:
<br />
class CA : CObject<br />
{<br />
   int a;<br />
<br />
   void operator = (const CA& src) {};<br />
}<br />
<br />
class CB : CA<br />
{<br />
   int b;<br />
}<br />


The first class overwrites the = operator with an empty function.

The following code has a mystic result:

<br />
   CA obA;<br />
   CB obB;<br />
<br />
   obA.a=1;<br />
   obA.b=2;<br />
<br />
   obB=obA;<br />


The element b is copied, a not. Why? And what do the = operator in CObject? Why is b copied? Do I have to implement the operator in Class CB too?
Many questions no answer!

Thanx
Markus



Dr-Kuulun
AnswerRe: Deriving from CObject and using = operator Pin
Vytas31-Mar-06 23:57
Vytas31-Mar-06 23:57 
AnswerRe: Deriving from CObject and using = operator Pin
Michael Dunn1-Apr-06 6:13
sitebuilderMichael Dunn1-Apr-06 6:13 
GeneralRe: Deriving from CObject and using = operator Pin
Dr-Kuulun2-Apr-06 0:40
Dr-Kuulun2-Apr-06 0:40 
QuestionSave into a UTF-8 file? Pin
Abin31-Mar-06 23:04
Abin31-Mar-06 23:04 
AnswerRe: Save into a UTF-8 file? Pin
Hamid_RT31-Mar-06 23:43
Hamid_RT31-Mar-06 23:43 
AnswerRe: Save into a UTF-8 file? Pin
Michael Dunn1-Apr-06 6:15
sitebuilderMichael Dunn1-Apr-06 6:15 
Questionset bk color of radio buttons Pin
big_denny_20031-Mar-06 21:48
big_denny_20031-Mar-06 21:48 
AnswerRe: set bk color of radio buttons Pin
Hamid_RT31-Mar-06 23:35
Hamid_RT31-Mar-06 23:35 
AnswerRe: set bk color of radio buttons Pin
Hamid_RT31-Mar-06 23:39
Hamid_RT31-Mar-06 23:39 
QuestionHow to Load & Read XML File in MFC Pin
Amit Agarrwal31-Mar-06 20:57
Amit Agarrwal31-Mar-06 20:57 
AnswerRe: How to Load & Read XML File in MFC Pin
_AnsHUMAN_ 31-Mar-06 22:10
_AnsHUMAN_ 31-Mar-06 22:10 
GeneralRe: How to Load & Read XML File in MFC Pin
Amit Agarrwal31-Mar-06 22:21
Amit Agarrwal31-Mar-06 22:21 
GeneralRe: How to Load & Read XML File in MFC Pin
_AnsHUMAN_ 31-Mar-06 22:30
_AnsHUMAN_ 31-Mar-06 22:30 
AnswerRe: How to Load & Read XML File in MFC Pin
Hamid_RT31-Mar-06 23:26
Hamid_RT31-Mar-06 23:26 
AnswerRe: How to Load & Read XML File in MFC Pin
thatsme_cool31-Mar-06 23:30
thatsme_cool31-Mar-06 23:30 
GeneralRe: How to Load & Read XML File in MFC Pin
Amit Agarrwal31-Mar-06 23:54
Amit Agarrwal31-Mar-06 23:54 
GeneralRe: How to Load & Read XML File in MFC Pin
thatsme_cool1-Apr-06 0:05
thatsme_cool1-Apr-06 0:05 

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.