Click here to Skip to main content
15,899,825 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalstrange virtual function output Pin
George_George8-Feb-08 2:24
George_George8-Feb-08 2:24 
GeneralRe: strange virtual function output Pin
David Crow8-Feb-08 2:44
David Crow8-Feb-08 2:44 
GeneralRe: strange virtual function output Pin
George_George8-Feb-08 21:35
George_George8-Feb-08 21:35 
GeneralRe: strange virtual function output Pin
CPallini8-Feb-08 2:48
mveCPallini8-Feb-08 2:48 
GeneralRe: strange virtual function output Pin
George_George8-Feb-08 21:36
George_George8-Feb-08 21:36 
GeneralRe: strange virtual function output Pin
BadKarma8-Feb-08 2:55
BadKarma8-Feb-08 2:55 
GeneralRe: strange virtual function output Pin
George_George8-Feb-08 21:39
George_George8-Feb-08 21:39 
GeneralRe: strange virtual function output Pin
Rajkumar R8-Feb-08 3:40
Rajkumar R8-Feb-08 3:40 
George_George wrote:
2. if function is virtual, we should invoke the foo based on the type of instance pointed to, if not virtual, we should invoke the foo based on the type which is the pionter type;


Agree, and no confusion since pb is of Base type, for base foo is virtual hence the function called is through _vfptr, and _vfptr is same for both Base and Final, "Final" is the output,

u can check that by interchanging "virtual" keyword from Base to Final, in that case"since foo in Final is not final" is valid
GeneralRe: strange virtual function output Pin
George_George8-Feb-08 21:47
George_George8-Feb-08 21:47 
GeneralRe: strange virtual function output Pin
Rajkumar R8-Feb-08 23:01
Rajkumar R8-Feb-08 23:01 
GeneralRe: strange virtual function output Pin
George_George9-Feb-08 20:57
George_George9-Feb-08 20:57 
GeneralRe: strange virtual function output Pin
Rajkumar R10-Feb-08 22:29
Rajkumar R10-Feb-08 22:29 
GeneralRe: strange virtual function output Pin
George_George10-Feb-08 22:33
George_George10-Feb-08 22:33 
GeneralRe: strange virtual function output Pin
Rajkumar R10-Feb-08 23:04
Rajkumar R10-Feb-08 23:04 
GeneralRe: strange virtual function output Pin
George_George11-Feb-08 22:03
George_George11-Feb-08 22:03 
GeneralEmbedding HTML code into VC Pin
Gita.Bairavi8-Feb-08 1:37
Gita.Bairavi8-Feb-08 1:37 
GeneralRe: Embedding HTML code into VC Pin
Rajkumar R8-Feb-08 3:56
Rajkumar R8-Feb-08 3:56 
GeneralRe: Embedding HTML code into VC Pin
Hamid_RT10-Feb-08 21:28
Hamid_RT10-Feb-08 21:28 
QuestionWhy ++++i works and i++++ does not work? Pin
Don Box8-Feb-08 0:53
Don Box8-Feb-08 0:53 
AnswerRe: Why ++++i works and i++++ does not work? Pin
CPallini8-Feb-08 0:58
mveCPallini8-Feb-08 0:58 
AnswerRe: Why ++++i works and i++++ does not work? Pin
ShilpiP8-Feb-08 1:02
ShilpiP8-Feb-08 1:02 
AnswerRe: Why ++++i works and i++++ does not work? Pin
David Crow8-Feb-08 2:37
David Crow8-Feb-08 2:37 
AnswerRe: Why ++++i works and i++++ does not work? Pin
Gregory Bryant10-Feb-08 16:42
Gregory Bryant10-Feb-08 16:42 
GeneralDirect Show and Multiple sound cards!! Pin
~Jabeen~8-Feb-08 0:41
~Jabeen~8-Feb-08 0:41 
GeneralRe: Direct Show and Multiple sound cards!! Pin
Rajkumar R8-Feb-08 1:49
Rajkumar R8-Feb-08 1:49 

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.