Click here to Skip to main content
15,112,354 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
AnswerRe: function to delete a class Pin
Richard MacCutchan21-Apr-15 22:11
mveRichard MacCutchan21-Apr-15 22:11 
GeneralRe: function to delete a class Pin
bkelly1322-Apr-15 5:08
Memberbkelly1322-Apr-15 5:08 
QuestionRe: function to delete a class Pin
Richard MacCutchan22-Apr-15 7:27
mveRichard MacCutchan22-Apr-15 7:27 
AnswerRe: function to delete a class Pin
bkelly1322-Apr-15 10:15
Memberbkelly1322-Apr-15 10:15 
GeneralRe: function to delete a class Pin
Richard MacCutchan22-Apr-15 23:27
mveRichard MacCutchan22-Apr-15 23:27 
GeneralRe: function to delete a class Pin
bkelly1323-Apr-15 17:16
Memberbkelly1323-Apr-15 17:16 
GeneralRe: function to delete a class Pin
Richard MacCutchan23-Apr-15 22:11
mveRichard MacCutchan23-Apr-15 22:11 
GeneralRe: function to delete a class Pin
Richard MacCutchan23-Apr-15 0:15
mveRichard MacCutchan23-Apr-15 0:15 
This is how it needs to be done:
C++
// Object is a base class (that does not need to do anything)
class Object
{
public:
    Object()
    {
        cout << "Object constructor" << endl;
    };
    virtual ~Object()
    {
        cout << "Object destructor" << endl;
    };
};

// Widget, and all other classes need to inherit Object
class Widget : Object
{
public:
    Widget()
    {
        cout << "Widget constructor" << endl;
    };
    ~Widget()
    {
        cout << "Widget destructor" << endl;
    };
};

// Delete_Stuff takes an Object pointer as its second parameter
static void Delete_Stuff(char* name, Object* object)
{
    cout << "cleanup " << name << endl;

    // delete will now correctly delete any object
    delete object;
}

QuestionAlways on top (Task Manager) C# Pin
Rainsey Long25-Mar-15 6:45
MemberRainsey Long25-Mar-15 6:45 
AnswerRe: Always on top (Task Manager) C# Pin
Richard MacCutchan25-Mar-15 7:33
mveRichard MacCutchan25-Mar-15 7:33 
GeneralRe: Always on top (Task Manager) C# Pin
Rainsey Long25-Mar-15 8:01
MemberRainsey Long25-Mar-15 8:01 
GeneralRe: Always on top (Task Manager) C# Pin
Richard MacCutchan25-Mar-15 8:58
mveRichard MacCutchan25-Mar-15 8:58 
Questionwhere is WINVER set (resolved) Pin
bkelly1323-Mar-15 9:43
Memberbkelly1323-Mar-15 9:43 
AnswerRe: where is WINVER set Pin
Richard MacCutchan23-Mar-15 23:27
mveRichard MacCutchan23-Mar-15 23:27 
AnswerRe: where is WINVER set Pin
Theo Buys2-Apr-15 1:27
MemberTheo Buys2-Apr-15 1:27 
GeneralRe: where is WINVER set Pin
bkelly134-Apr-15 10:11
Memberbkelly134-Apr-15 10:11 
QuestionUnicode and codeproject article Pin
bkelly1325-Feb-15 11:30
Memberbkelly1325-Feb-15 11:30 
AnswerRe: Unicode and codeproject article Pin
Daniel Pfeffer25-Feb-15 22:02
professionalDaniel Pfeffer25-Feb-15 22:02 
GeneralRe: Unicode and codeproject article Pin
bkelly1326-Feb-15 4:34
Memberbkelly1326-Feb-15 4:34 
GeneralRe: Unicode and codeproject article Pin
bkelly1328-Feb-15 11:36
Memberbkelly1328-Feb-15 11:36 
GeneralRe: Unicode and codeproject article Pin
Daniel Pfeffer28-Feb-15 12:52
professionalDaniel Pfeffer28-Feb-15 12:52 
GeneralRe: Unicode and codeproject article Pin
Richard MacCutchan28-Feb-15 22:22
mveRichard MacCutchan28-Feb-15 22:22 
GeneralRe: Unicode and codeproject article Pin
Daniel Pfeffer28-Feb-15 23:12
professionalDaniel Pfeffer28-Feb-15 23:12 
GeneralRe: Unicode and codeproject article Pin
Richard MacCutchan28-Feb-15 23:15
mveRichard MacCutchan28-Feb-15 23:15 
GeneralRe: Unicode and codeproject article Pin
Daniel Pfeffer28-Feb-15 23:19
professionalDaniel Pfeffer28-Feb-15 23:19 

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.