Click here to Skip to main content
15,896,912 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: plzz hlep Pin
Hamid_RT20-Dec-07 5:22
Hamid_RT20-Dec-07 5:22 
JokeRe: plzz hlep Pin
David Crow20-Dec-07 5:28
David Crow20-Dec-07 5:28 
Questionvirtual member? Pin
Stan the man20-Dec-07 2:52
Stan the man20-Dec-07 2:52 
AnswerRe: virtual member? Pin
Chris Losinger20-Dec-07 3:01
professionalChris Losinger20-Dec-07 3:01 
GeneralRe: virtual member? Pin
Stan the man20-Dec-07 3:07
Stan the man20-Dec-07 3:07 
AnswerRe: virtual member? Pin
Maximilien20-Dec-07 3:06
Maximilien20-Dec-07 3:06 
GeneralRe: virtual member? Pin
Stan the man20-Dec-07 3:11
Stan the man20-Dec-07 3:11 
AnswerRe: virtual member? Pin
Matthew Faithfull20-Dec-07 3:12
Matthew Faithfull20-Dec-07 3:12 
I think there's a bit of an OO design issue going on here. Perhaps you need some data hiding...
<br />
class CBase<br />
{<br />
public:<br />
  virtual int AccessorFunctionThatDealsWithTest();<br />
<br />
private:<br />
  CTest m_test;<br />
};<br />
<br />
class CDerived1 : public CBase<br />
{<br />
public:<br />
  int AccessorFunctionThatDealsWithTest();//override of CBase virtual function<br />
<br />
private:<br />
  CSomeOtherTest m_test;<br />
};<br />


If you do this then it matters not if CTest and CSomeOtherTest are related, they can be but the 'user' of CBase:CDerived1 hierarchy doesn't have to know or care because the AccessorFunctionThatDealsWithTest() interface is the same even though its implementation might be entirely different. Now that makes me Big Grin | :-D
Nothing is exactly what it seems but everything with seems can be unpicked.

GeneralConvert string to long Pin
SWDevil20-Dec-07 2:41
SWDevil20-Dec-07 2:41 
GeneralRe: Convert string to long Pin
CPallini20-Dec-07 2:53
mveCPallini20-Dec-07 2:53 
GeneralRe: Convert string to long Pin
Matthew Faithfull20-Dec-07 3:03
Matthew Faithfull20-Dec-07 3:03 
QuestionDetection of databases Pin
tom groezer20-Dec-07 2:14
tom groezer20-Dec-07 2:14 
GeneralRe: Detection of databases Pin
David Crow20-Dec-07 2:28
David Crow20-Dec-07 2:28 
Questionhow to format a pen drive? Pin
Shayantani20-Dec-07 1:27
Shayantani20-Dec-07 1:27 
AnswerRe: how to format a pen drive? [modified] Pin
kakan20-Dec-07 2:08
professionalkakan20-Dec-07 2:08 
GeneralReally Not An Easy Ques. !!!!!!!! Pin
AhmedOsamaMoh20-Dec-07 1:13
AhmedOsamaMoh20-Dec-07 1:13 
GeneralRe: Really Not An Easy Ques. !!!!!!!! Pin
CPallini20-Dec-07 1:58
mveCPallini20-Dec-07 1:58 
GeneralRe: Really Not An Easy Ques. !!!!!!!! Pin
AhmedOsamaMoh20-Dec-07 2:28
AhmedOsamaMoh20-Dec-07 2:28 
GeneralRe: Really Not An Easy Ques. !!!!!!!! Pin
David Crow20-Dec-07 2:35
David Crow20-Dec-07 2:35 
GeneralRe: Really Not An Easy Ques. !!!!!!!! Pin
CPallini20-Dec-07 2:38
mveCPallini20-Dec-07 2:38 
GeneralRe: Really Not An Easy Ques. !!!!!!!! Pin
Matthew Faithfull20-Dec-07 2:46
Matthew Faithfull20-Dec-07 2:46 
GeneralRe: Really Not An Easy Ques. !!!!!!!! Pin
Member 75496020-Dec-07 4:27
Member 75496020-Dec-07 4:27 
GeneralRe: Really Not An Easy Ques. !!!!!!!! Pin
AhmedOsamaMoh20-Dec-07 5:44
AhmedOsamaMoh20-Dec-07 5:44 
GeneralRe: Really Not An Easy Ques. !!!!!!!! Pin
David Crow20-Dec-07 5:51
David Crow20-Dec-07 5:51 
GeneralRe: Really Not An Easy Ques. !!!!!!!! Pin
Member 75496020-Dec-07 5:58
Member 75496020-Dec-07 5:58 

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.