Click here to Skip to main content
15,910,130 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to get information about logoff process in win2000 Pin
Hamid_RT27-Apr-06 2:21
Hamid_RT27-Apr-06 2:21 
Question[Message Deleted] Pin
sherton21-Apr-06 0:40
sherton21-Apr-06 0:40 
AnswerRe: _beginthread or _beginthreadex & CreateThread Pin
Naveen21-Apr-06 0:49
Naveen21-Apr-06 0:49 
AnswerRe: _beginthread or _beginthreadex & CreateThread Pin
vikramlinux21-Apr-06 0:51
vikramlinux21-Apr-06 0:51 
AnswerRe: _beginthread or _beginthreadex & CreateThread Pin
Stephen Hewitt21-Apr-06 0:51
Stephen Hewitt21-Apr-06 0:51 
QuestionVirtual Constructors Pin
Rinu_Raj21-Apr-06 0:20
Rinu_Raj21-Apr-06 0:20 
GeneralRe: Virtual Constructors Pin
vikramlinux21-Apr-06 0:27
vikramlinux21-Apr-06 0:27 
AnswerRe: Virtual Constructors Pin
Stephen Hewitt21-Apr-06 0:30
Stephen Hewitt21-Apr-06 0:30 
C++ does not allow constructors to be virtual. The term "Virtual Constructors" refers to virtual methods of a factory classes that creates other classes. An example:

// Assume we have many implementations of a classes derived from CWorkerBase.
// They are named CWorkerBase_CompanyName.
 
class CFactoryBase
{
public:
    virtual CWorkerBase* Create() = 0;
};

class CFactory_Microsoft : public CFactoryBase
{
public:
    virtual CWorkerBase* Create()
    {
       return new CWorkerBase_Mircrosoft();
    }
};

class CFactory_Borland  : public CFactoryBase
{
public:
    virtual CWorkerBase* Create()
    {
       return new CWorkerBase_Borland();
    }
};


In this context the Create methods are sometimes called virtual constructors.


Steve
GeneralRe: Virtual Constructors Pin
Stephen Hewitt21-Apr-06 0:46
Stephen Hewitt21-Apr-06 0:46 
GeneralRe: Virtual Constructors Pin
Stephen Hewitt21-Apr-06 0:54
Stephen Hewitt21-Apr-06 0:54 
GeneralRe: Virtual Constructors Pin
toxcct21-Apr-06 0:55
toxcct21-Apr-06 0:55 
GeneralRe: Virtual Constructors Pin
Roger Stoltz21-Apr-06 1:28
Roger Stoltz21-Apr-06 1:28 
QuestionRe: Virtual Constructors Pin
Maxwell Chen21-Apr-06 6:35
Maxwell Chen21-Apr-06 6:35 
GeneralRe: Virtual Constructors Pin
Rinu_Raj21-Apr-06 1:09
Rinu_Raj21-Apr-06 1:09 
GeneralRe: Virtual Constructors Pin
Eytukan21-Apr-06 4:26
Eytukan21-Apr-06 4:26 
AnswerRe: Virtual Constructors Pin
User 21559721-Apr-06 0:31
User 21559721-Apr-06 0:31 
GeneralRe: Virtual Constructors Pin
Nishad S21-Apr-06 0:36
Nishad S21-Apr-06 0:36 
AnswerRe: Virtual Constructors Pin
Nishad S21-Apr-06 0:34
Nishad S21-Apr-06 0:34 
GeneralRe: Virtual Constructors Pin
David Crow21-Apr-06 3:03
David Crow21-Apr-06 3:03 
AnswerRe: Virtual Constructors Pin
David Crow21-Apr-06 2:55
David Crow21-Apr-06 2:55 
QuestionThe BootExecute Data Entry Pin
rajeevktripathi20-Apr-06 23:49
rajeevktripathi20-Apr-06 23:49 
QuestionRe: The BootExecute Data Entry Pin
David Crow21-Apr-06 3:05
David Crow21-Apr-06 3:05 
QuestionABC Abstract base class Pin
Krishnatv20-Apr-06 23:48
Krishnatv20-Apr-06 23:48 
AnswerRe: ABC Abstract base class Pin
Cedric Moonen20-Apr-06 23:52
Cedric Moonen20-Apr-06 23:52 
GeneralRe: ABC Abstract base class Pin
Nishad S20-Apr-06 23:59
Nishad S20-Apr-06 23:59 

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.