Click here to Skip to main content
15,892,059 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Pocket PC windows and the Return Key, it always closes them :'( Pin
Chris Losinger31-Dec-07 10:23
professionalChris Losinger31-Dec-07 10:23 
GeneralRe: Pocket PC windows and the Return Key, it always closes them :'( Pin
OwenBurnett31-Dec-07 10:44
OwenBurnett31-Dec-07 10:44 
GeneralRe: Pocket PC windows and the Return Key, it always closes them :'( Pin
Chris Losinger31-Dec-07 10:51
professionalChris Losinger31-Dec-07 10:51 
GeneralRe: Pocket PC windows and the Return Key, it always closes them :'( Pin
OwenBurnett31-Dec-07 12:41
OwenBurnett31-Dec-07 12:41 
QuestionOnMouseMove Flags Pin
Hakan Bulut31-Dec-07 4:31
Hakan Bulut31-Dec-07 4:31 
GeneralRe: OnMouseMove Flags Pin
ashukasama31-Dec-07 4:42
ashukasama31-Dec-07 4:42 
GeneralRe: OnMouseMove Flags Pin
Hakan Bulut31-Dec-07 7:38
Hakan Bulut31-Dec-07 7:38 
GeneralSimple C++ Inheritance and Performance Pin
Lea Hayes31-Dec-07 2:50
Lea Hayes31-Dec-07 2:50 
Hi,

I am working on an element of a program which is performance cruical and I wanted to clarify something with regards to basic C++ inheritance.

Consider the following:

class BaseClass<br />
{<br />
public:<br />
   BaseClass();<br />
<br />
   void foo();<br />
<br />
private:<br />
   int baz;<br />
};<br />
<br />
class AnotherClass : public BaseClass<br />
{<br />
public:<br />
   AnotherClass();<br />
<br />
   void bar();<br />
};



It is important to note that no virtual functions will be used within this element; including no virtual destructor.

My question is this, would there be any performance differences between the above source and the source listed below?

class CombinedClass<br />
{<br />
public:<br />
   CombinedClass();<br />
<br />
   void foo();<br />
   void bar();<br />
<br />
private:<br />
   int baz;<br />
};


The first example would be easier for me to maintain because there will be many variations of 'AnotherClass'. Does anybody know of the nitty-gritty low-level differences between the two and any such differences in performance?

Also do overloaded methods cause performance differences?

Any advice would be greatly appreciated!
Lea Hayes
AnswerRe: Simple C++ Inheritance and Performance Pin
Florin Crişan31-Dec-07 3:14
Florin Crişan31-Dec-07 3:14 
GeneralRe: Simple C++ Inheritance and Performance Pin
Florin Crişan31-Dec-07 3:17
Florin Crişan31-Dec-07 3:17 
GeneralRe: Simple C++ Inheritance and Performance Pin
Lea Hayes31-Dec-07 4:23
Lea Hayes31-Dec-07 4:23 
GeneralRe: Simple C++ Inheritance and Performance Pin
CPallini31-Dec-07 3:25
mveCPallini31-Dec-07 3:25 
GeneralRe: Simple C++ Inheritance and Performance [modified] Pin
Florin Crişan31-Dec-07 3:28
Florin Crişan31-Dec-07 3:28 
GeneralWhat other people say about this: Pin
Florin Crişan31-Dec-07 3:35
Florin Crişan31-Dec-07 3:35 
JokeHappy New Year! Pin
Florin Crişan31-Dec-07 3:40
Florin Crişan31-Dec-07 3:40 
GeneralRe: Simple C++ Inheritance and Performance Pin
CPallini31-Dec-07 3:42
mveCPallini31-Dec-07 3:42 
GeneralRe: Simple C++ Inheritance and Performance Pin
Florin Crişan31-Dec-07 3:46
Florin Crişan31-Dec-07 3:46 
GeneralRe: Simple C++ Inheritance and Performance Pin
CPallini31-Dec-07 4:09
mveCPallini31-Dec-07 4:09 
GeneralRe: Simple C++ Inheritance and Performance Pin
Lea Hayes31-Dec-07 4:27
Lea Hayes31-Dec-07 4:27 
Questionhow can i convert a BYTE value into CString Pin
rajneshmalik31-Dec-07 2:18
rajneshmalik31-Dec-07 2:18 
AnswerRe: how can i convert a BYTE value into CString Pin
Florin Crişan31-Dec-07 2:50
Florin Crişan31-Dec-07 2:50 
GeneralRe: how can i convert a BYTE value into CString Pin
Florin Crişan31-Dec-07 3:04
Florin Crişan31-Dec-07 3:04 
AnswerRe: how can i convert a BYTE value into CString [modified] Pin
Nishad S31-Dec-07 2:52
Nishad S31-Dec-07 2:52 
AnswerRe: how can i convert a BYTE value into CString Pin
Lea Hayes31-Dec-07 3:03
Lea Hayes31-Dec-07 3:03 
QuestionRe: how can i convert a BYTE value into CString Pin
Florin Crişan31-Dec-07 3:08
Florin Crişan31-Dec-07 3:08 

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.