Click here to Skip to main content
15,908,020 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionVirtual constructors... Pin
funwithdolphin15-Nov-05 0:07
funwithdolphin15-Nov-05 0:07 
AnswerRe: Virtual constructors... Pin
Cedric Moonen15-Nov-05 0:45
Cedric Moonen15-Nov-05 0:45 
AnswerRe: Virtual constructors... Pin
Bob Stanneveld15-Nov-05 6:01
Bob Stanneveld15-Nov-05 6:01 
GeneralRe: Virtual constructors... Pin
toxcct15-Nov-05 6:24
toxcct15-Nov-05 6:24 
GeneralRe: Virtual constructors... Pin
Bob Stanneveld15-Nov-05 22:57
Bob Stanneveld15-Nov-05 22:57 
AnswerRe: Virtual constructors... Pin
cmk15-Nov-05 12:23
cmk15-Nov-05 12:23 
QuestionAbstract Base classes vs Interfaces Pin
funwithdolphin15-Nov-05 0:01
funwithdolphin15-Nov-05 0:01 
AnswerRe: Abstract Base classes vs Interfaces Pin
Cedric Moonen15-Nov-05 0:52
Cedric Moonen15-Nov-05 0:52 
If I remember correctly (I'm not sure anymore Wink | ;) ) an abstract class is a class that contain at least one pure virtual function (a pure virtual function is a function that MUST be redefined in every class that inherits from the base class)
A pure virtual function looks like:

virtual void Test() = 0;

If you try to declare an instance of a class containing a pure virtual function, you will have an compile error saying that it cannot create an instance of the class due to a pure virtual function. It is used to 'forbid' an instanciation of the class (the class is just used as base class for another class and cannot be used 'alone').

Concerning the interface, also called pure abstract class, it's a class that contain only pure virtual functions and no member variables (for this last point, I think there are different opinions). So, the class itself is 'empty' because no functions has been defined.

Hope this helps
AnswerRe: Abstract Base classes vs Interfaces Pin
deardear15-Nov-05 1:00
deardear15-Nov-05 1:00 
AnswerRe: Abstract Base classes vs Interfaces Pin
toxcct15-Nov-05 1:02
toxcct15-Nov-05 1:02 
AnswerRe: Abstract Base classes vs Interfaces Pin
LogiPro10125-Jan-09 11:32
LogiPro10125-Jan-09 11:32 
QuestionBuiding dll with Visual Studio 2003 Pin
Emb_Emb14-Nov-05 23:42
Emb_Emb14-Nov-05 23:42 
QuestionEasy installation of printer drivers Pin
Palani Surendrnath14-Nov-05 23:40
Palani Surendrnath14-Nov-05 23:40 
AnswerRe: Easy installation of printer drivers Pin
toxcct15-Nov-05 0:13
toxcct15-Nov-05 0:13 
QuestionActiveX control without parent container Pin
Ahsan Askare14-Nov-05 23:35
Ahsan Askare14-Nov-05 23:35 
QuestionEasy installation of printer drivers Pin
Palani Surendrnath14-Nov-05 23:23
Palani Surendrnath14-Nov-05 23:23 
Questionwstring to LPCTSTR Pin
Luke Murray14-Nov-05 22:54
Luke Murray14-Nov-05 22:54 
AnswerRe: wstring to LPCTSTR Pin
kakan15-Nov-05 0:07
professionalkakan15-Nov-05 0:07 
GeneralRe: wstring to LPCTSTR Pin
Luke Murray15-Nov-05 12:44
Luke Murray15-Nov-05 12:44 
AnswerRe: wstring to LPCTSTR Pin
22491715-Nov-05 1:56
22491715-Nov-05 1:56 
GeneralRe: wstring to LPCTSTR Pin
sunit515-Nov-05 2:21
sunit515-Nov-05 2:21 
GeneralRe: wstring to LPCTSTR Pin
toxcct15-Nov-05 2:43
toxcct15-Nov-05 2:43 
GeneralRe: wstring to LPCTSTR Pin
22491715-Nov-05 5:44
22491715-Nov-05 5:44 
GeneralRe: wstring to LPCTSTR Pin
Luke Murray15-Nov-05 12:42
Luke Murray15-Nov-05 12:42 
GeneralRe: wstring to LPCTSTR Pin
22491715-Nov-05 17:16
22491715-Nov-05 17:16 

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.