Click here to Skip to main content
15,897,704 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralA Question about CDockBar Pin
prabbit201030-Dec-04 4:21
prabbit201030-Dec-04 4:21 
GeneralProblem with printing in CRichEditView Pin
Stojan7830-Dec-04 4:02
Stojan7830-Dec-04 4:02 
GeneralWeb Services Pin
Rassul Yunussov30-Dec-04 1:14
Rassul Yunussov30-Dec-04 1:14 
GeneralPreprocessor Pasting in Resources Pin
Joel Holdsworth30-Dec-04 0:38
Joel Holdsworth30-Dec-04 0:38 
GeneralRe: Preprocessor Pasting in Resources Pin
Neville Franks30-Dec-04 1:23
Neville Franks30-Dec-04 1:23 
GeneralRe: Preprocessor Pasting in Resources Pin
Michael Bergman30-Dec-04 10:31
Michael Bergman30-Dec-04 10:31 
GeneralRe: Preprocessor Pasting in Resources Pin
Michael Dunn30-Dec-04 6:07
sitebuilderMichael Dunn30-Dec-04 6:07 
GeneralQuestions about inheritance Pin
Anonymous30-Dec-04 0:16
Anonymous30-Dec-04 0:16 
Hello,
I have two questions, one is more general and it's about diamond shpae inheritance, C,B inherit A virtually ans D inherits C and B.
a lot of people tell me to avoid diamond inheritance, but they don't know to explain the reasons. so that's the first question, does any one know problems that pop up when using that inheritance?

the socond question is about efficiency,
suppose I have class A, the class has a member variable "v" that can be only 2 values, the value doesn't change after A is allocated. now A has a function that returns '1' if "v"==something and '2' otherwise.
the question is what will be more efficient? to write the function using 'if' statement, or having two classes with virtual function.

to answer that assume that the function is called A LOT of times, but also there are A LOT of allocations of A (or the inherited classes).

thanks,
Guy.
GeneralRe: Questions about inheritance Pin
V.30-Dec-04 3:22
professionalV.30-Dec-04 3:22 
GeneralRe: Questions about inheritance Pin
Vangelis Fortounas30-Dec-04 4:07
Vangelis Fortounas30-Dec-04 4:07 
GeneralRe: Questions about inheritance Pin
Maximilien30-Dec-04 5:26
Maximilien30-Dec-04 5:26 
GeneralRe: Questions about inheritance Pin
Anonymous30-Dec-04 6:37
Anonymous30-Dec-04 6:37 
GeneralRe: Questions about inheritance Pin
Maximilien30-Dec-04 5:22
Maximilien30-Dec-04 5:22 
GeneralGettting Toolbar from CWnd* Pin
Member 24341329-Dec-04 23:18
Member 24341329-Dec-04 23:18 
GeneralRe: Gettting Toolbar from CWnd* Pin
Neville Franks30-Dec-04 1:43
Neville Franks30-Dec-04 1:43 
GeneralInconsistency behaviour of APIs - Help me Pin
MaharajM29-Dec-04 23:07
MaharajM29-Dec-04 23:07 
GeneralRe: Inconsistency behaviour of APIs - Help me Pin
David Crow30-Dec-04 3:06
David Crow30-Dec-04 3:06 
Generalsending midi thru usb!!!!!anyone plz help!!!! Pin
namaskaaram29-Dec-04 21:10
namaskaaram29-Dec-04 21:10 
Questionimporting third party library? Pin
Maverick29-Dec-04 20:31
Maverick29-Dec-04 20:31 
AnswerRe: importing third party library? Pin
Maverick29-Dec-04 21:01
Maverick29-Dec-04 21:01 
GeneralWindows service Pin
hou_12629-Dec-04 18:53
hou_12629-Dec-04 18:53 
GeneralRe: Windows service Pin
Joel Holdsworth30-Dec-04 1:50
Joel Holdsworth30-Dec-04 1:50 
GeneralA question about GetDlgItem Pin
IsaacLitingjun29-Dec-04 16:20
IsaacLitingjun29-Dec-04 16:20 
GeneralRe: A question about GetDlgItem Pin
Rahim Rattani29-Dec-04 19:21
Rahim Rattani29-Dec-04 19:21 
GeneralRe: A question about GetDlgItem Pin
IsaacLitingjun29-Dec-04 20:23
IsaacLitingjun29-Dec-04 20:23 

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.