Click here to Skip to main content
16,019,043 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: windows keyboard hook / postmessage / sendmessage Pin
AprNgp22-Feb-07 6:26
AprNgp22-Feb-07 6:26 
QuestionReading text file.. Code works but how to include with rest program ? Pin
Software_Specialist22-Feb-07 3:00
Software_Specialist22-Feb-07 3:00 
GeneralRe: Reading text file.. Code works but how to include with rest program ? Pin
Programm3r22-Feb-07 3:41
Programm3r22-Feb-07 3:41 
QuestionRe: Reading text file.. Code works but how to include with rest program ? Pin
David Crow22-Feb-07 5:56
David Crow22-Feb-07 5:56 
GeneralRe: Reading text file.. Code works but how to include with rest program ? Pin
Mark Salsbery22-Feb-07 7:09
Mark Salsbery22-Feb-07 7:09 
QuestionDetection of USB device Pin
Vjys22-Feb-07 2:18
Vjys22-Feb-07 2:18 
QuestionExact Difference between an Abstract Class and Interface in COM. Pin
uday kiran janaswamy22-Feb-07 1:11
uday kiran janaswamy22-Feb-07 1:11 
AnswerRe: Exact Difference between an Abstract Class and Interface in COM. Pin
Cedric Moonen22-Feb-07 1:21
Cedric Moonen22-Feb-07 1:21 
uday kiran janaswamy wrote:
1) Why can't we directly instantiate an Abstract Class, and why we have to create it by its Derived Class only.


Because that's one of the C++ feature (and it is a very valuable feature: it prevents user to instantiate classes that are not supposed to be instancied). By supplying at least one pure virtual function, your class is abstract:

CMyClass
{
virtual void MyFunc() = 0;   // Pure virtual function
};



uday kiran janaswamy wrote:
2) What is the Difference between an Abstract Class and an Interface in COM.


For me (but I don't know if this is totally true), an abstract class is a class that cannot be instantiated directly (meaning it has at least one pure virtual function). A interface is a "pure abstract class": a class that has only member functions (no member variables) and all of them are pure virtual. In fact this class has no functionality at all, it is just an interface to a class that implements those functionalities.


Cédric Moonen
Software developer

Charting control [v1.1]

GeneralRe: Exact Difference between an Abstract Class and Interface in COM. Pin
uday kiran janaswamy22-Feb-07 1:34
uday kiran janaswamy22-Feb-07 1:34 
AnswerRe: Exact Difference between an Abstract Class and Interface in COM. Pin
prasad_som22-Feb-07 1:35
prasad_som22-Feb-07 1:35 
GeneralRe: Exact Difference between an Abstract Class and Interface in COM. Pin
Cedric Moonen22-Feb-07 1:49
Cedric Moonen22-Feb-07 1:49 
AnswerRe: Exact Difference between an Abstract Class and Interface in COM. Pin
prasad_som22-Feb-07 1:54
prasad_som22-Feb-07 1:54 
AnswerRe: Exact Difference between an Abstract Class and Interface in COM [modified]. Pin
CPallini22-Feb-07 1:59
mveCPallini22-Feb-07 1:59 
QuestionVc++ pore toolkit Pin
Satheeshkumar_Balakrishnan21-Feb-07 23:51
Satheeshkumar_Balakrishnan21-Feb-07 23:51 
AnswerRe: Vc++ pore toolkit Pin
Cedric Moonen21-Feb-07 23:55
Cedric Moonen21-Feb-07 23:55 
GeneralRe: Vc++ pore toolkit Pin
Reagan Conservative22-Feb-07 3:16
Reagan Conservative22-Feb-07 3:16 
GeneralRe: Vc++ pore toolkit Pin
Cedric Moonen22-Feb-07 3:30
Cedric Moonen22-Feb-07 3:30 
AnswerRe: Vc++ pore toolkit Pin
Hamid Taebi22-Feb-07 0:47
professionalHamid Taebi22-Feb-07 0:47 
QuestionDrag and Drop Pin
Try21-Feb-07 22:19
Try21-Feb-07 22:19 
AnswerRe: Drag and Drop Pin
prasad_som22-Feb-07 3:00
prasad_som22-Feb-07 3:00 
AnswerRe: Drag and Drop Pin
Arman S.22-Feb-07 4:51
Arman S.22-Feb-07 4:51 
QuestionRe: Drag and Drop Pin
Mark Salsbery22-Feb-07 5:47
Mark Salsbery22-Feb-07 5:47 
AnswerRe: Drag and Drop Pin
Try22-Feb-07 16:55
Try22-Feb-07 16:55 
QuestionProblem drawing inside a dialog box [modified] Pin
jones16621-Feb-07 22:08
jones16621-Feb-07 22:08 
QuestionRe: Problem drawing inside a dialog box Pin
prasad_som22-Feb-07 1:29
prasad_som22-Feb-07 1:29 

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.