Click here to Skip to main content
15,909,835 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Random Number Pin
Ingo26-Sep-12 0:35
Ingo26-Sep-12 0:35 
AnswerRe: Random Number Pin
_AnsHUMAN_ 26-Sep-12 0:12
_AnsHUMAN_ 26-Sep-12 0:12 
AnswerRe: Random Number Pin
Software_Developer26-Sep-12 8:00
Software_Developer26-Sep-12 8:00 
AnswerOT Just curious... Pin
jeron126-Sep-12 8:21
jeron126-Sep-12 8:21 
QuestionRe: OT Just curious... Pin
David Crow26-Sep-12 10:52
David Crow26-Sep-12 10:52 
AnswerRe: OT Just curious... Pin
CPallini26-Sep-12 10:55
mveCPallini26-Sep-12 10:55 
GeneralRe: OT Just curious... Pin
jeron126-Sep-12 11:02
jeron126-Sep-12 11:02 
GeneralRe: OT Just curious... Pin
CPallini26-Sep-12 11:14
mveCPallini26-Sep-12 11:14 
GeneralRe: OT Just curious... Pin
jeron126-Sep-12 12:15
jeron126-Sep-12 12:15 
Questionproblem deploying application Pin
appollosputnik25-Sep-12 8:40
appollosputnik25-Sep-12 8:40 
AnswerRe: problem deploying application Pin
Chris Meech25-Sep-12 9:00
Chris Meech25-Sep-12 9:00 
GeneralRe: problem deploying application Pin
appollosputnik25-Sep-12 21:28
appollosputnik25-Sep-12 21:28 
GeneralRe: problem deploying application Pin
Richard MacCutchan25-Sep-12 22:00
mveRichard MacCutchan25-Sep-12 22:00 
GeneralRe: problem deploying application Pin
appollosputnik26-Sep-12 21:02
appollosputnik26-Sep-12 21:02 
GeneralRe: problem deploying application Pin
Richard MacCutchan26-Sep-12 21:29
mveRichard MacCutchan26-Sep-12 21:29 
Questionexceptions always SIGABRT in linux shared object Pin
MichaelRoop25-Sep-12 1:28
MichaelRoop25-Sep-12 1:28 
AnswerRe: exceptions always SIGABRT in linux shared object Pin
Richard MacCutchan25-Sep-12 6:04
mveRichard MacCutchan25-Sep-12 6:04 
GeneralRe: exceptions always SIGABRT in linux shared object Pin
MichaelRoop25-Sep-12 11:02
MichaelRoop25-Sep-12 11:02 
GeneralRe: exceptions always SIGABRT in linux shared object Pin
MichaelRoop25-Sep-12 13:45
MichaelRoop25-Sep-12 13:45 
QuestionCppunit in Visual studio 2010 Pin
Rahul from Poona24-Sep-12 4:44
Rahul from Poona24-Sep-12 4:44 
AnswerRe: Cppunit in Visual studio 2010 Pin
Chris Meech24-Sep-12 5:56
Chris Meech24-Sep-12 5:56 
AnswerRe: Cppunit in Visual studio 2010 Pin
Albert Holguin24-Sep-12 6:43
professionalAlbert Holguin24-Sep-12 6:43 
AnswerRe: Cppunit in Visual studio 2010 Pin
jschell24-Sep-12 12:39
jschell24-Sep-12 12:39 
QuestionLate Binding Concept Pin
AmbiguousName23-Sep-12 20:30
AmbiguousName23-Sep-12 20:30 
Hello. I am little confused in Late Binding Concept (although I understand it theoretically) as I could not understand it programatically. I am defining two classes here and then casting and using their pointers.

CBaseClass
<br />
void CBaseClass::Function() // this is virtual function<br />
{<br />
  cout<<"\nBase Class.";<br />
}<br />


CChildClass
<br />
void CChildClass::Function() // overriden virtual function<br />
{<br />
  cout<<"\nChild Class.";<br />
}<br />


MainClass
<br />
void main()<br />
{<br />
  CBaseClass* pBase = new cBaseClass();<br />
  CChildClass* pChild = (CChildClass*)pBase;<br />
<br />
 pBase->Function();<br />
 pChild->Function();<br />
}<br />


What should the two function calls produce in MainClass. I think it should produce

BaseClass.
ChildClass.

But it actually produces

BaseClass.
BaseClass.

What is wrong with my understanding. Thanks

This world is going to explode due to international politics, SOON.

AnswerRe: Late Binding Concept Pin
CPallini23-Sep-12 22:27
mveCPallini23-Sep-12 22:27 

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.