Click here to Skip to main content
15,915,509 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionVS build/run problem. [modified] Pin
CodeGoose12-May-07 9:01
CodeGoose12-May-07 9:01 
AnswerRe: VS build/run problem. Pin
Hans Dietrich12-May-07 10:55
mentorHans Dietrich12-May-07 10:55 
GeneralRe: VS build/run problem. Pin
CodeGoose12-May-07 13:31
CodeGoose12-May-07 13:31 
AnswerRe: VS build/run problem. Pin
prasad_som12-May-07 19:33
prasad_som12-May-07 19:33 
AnswerRe: VS build/run problem. Pin
Gary R. Wheeler13-May-07 2:37
Gary R. Wheeler13-May-07 2:37 
Questionsimple question Pin
Dj_Lordas12-May-07 8:26
Dj_Lordas12-May-07 8:26 
AnswerRe: simple question Pin
biswajit nayak12-May-07 8:50
biswajit nayak12-May-07 8:50 
AnswerRe: simple question Pin
John R. Shaw12-May-07 11:27
John R. Shaw12-May-07 11:27 
Basically you are dealing with inheritance and you need the base class to call a member function in a derived class. What that means: if you convert a pointer to a derived class to that of the base class and call a virtual function that is defined in both classes, the one in the derived class will be called.
class A { virtual const void printName() { cout << "class A" << endl; }
class B: public A { virtual void char printName() { cout << "class B" << endl; }
class C: public B { virtual void char printName() { cout << "class C" << endl; }

C c;
A* pa = dynamic_cast<A*>&c; // cast pointer to C to pointer to A
pa->printName(); // should print ‘class C’



INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra

Questionrelated to vc++ and xml Pin
biswajit nayak12-May-07 8:13
biswajit nayak12-May-07 8:13 
AnswerRe: related to vc++ and xml Pin
CPallini12-May-07 8:21
mveCPallini12-May-07 8:21 
AnswerRe: related to vc++ and xml Pin
Hamid_RT12-May-07 8:26
Hamid_RT12-May-07 8:26 
Questionvc++ related question Pin
biswajit nayak12-May-07 7:46
biswajit nayak12-May-07 7:46 
AnswerRe: vc++ related question Pin
CPallini12-May-07 8:10
mveCPallini12-May-07 8:10 
Questionvc++ related question Pin
biswajit nayak12-May-07 7:34
biswajit nayak12-May-07 7:34 
Questionvc++ related question Pin
biswajit nayak12-May-07 7:10
biswajit nayak12-May-07 7:10 
AnswerRe: vc++ related question Pin
Rick York12-May-07 7:20
mveRick York12-May-07 7:20 
GeneralRe: vc++ related question Pin
biswajit nayak12-May-07 7:24
biswajit nayak12-May-07 7:24 
GeneralRe: vc++ related question Pin
Rick York12-May-07 7:26
mveRick York12-May-07 7:26 
GeneralRe: vc++ related question Pin
Jörgen Sigvardsson12-May-07 7:33
Jörgen Sigvardsson12-May-07 7:33 
GeneralRe: vc++ related question Pin
Mark Salsbery12-May-07 7:52
Mark Salsbery12-May-07 7:52 
GeneralRe: vc++ related question Pin
Jörgen Sigvardsson12-May-07 8:34
Jörgen Sigvardsson12-May-07 8:34 
GeneralRe: vc++ related question Pin
Mark Salsbery12-May-07 8:46
Mark Salsbery12-May-07 8:46 
GeneralRe: vc++ related question Pin
Hamid_RT12-May-07 7:34
Hamid_RT12-May-07 7:34 
GeneralRe: vc++ related question Pin
Mark Salsbery12-May-07 8:10
Mark Salsbery12-May-07 8:10 
GeneralRe: vc++ related question Pin
Rick York12-May-07 9:05
mveRick York12-May-07 9: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.