Click here to Skip to main content
15,911,030 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to shrink a bitmap? Pin
clintsinger1-Nov-01 6:30
clintsinger1-Nov-01 6:30 
GeneralRe: How to shrink a bitmap? Pin
Deepak Khajuria1-Nov-01 20:22
Deepak Khajuria1-Nov-01 20:22 
GeneralCreating A Grid On A CView Pin
AJ12331-Oct-01 11:48
AJ12331-Oct-01 11:48 
GeneralRe: Creating A Grid On A CView Pin
Christian Graus31-Oct-01 19:08
protectorChristian Graus31-Oct-01 19:08 
GeneralSplitter windows w/o Doc/View Pin
bumby31-Oct-01 11:39
bumby31-Oct-01 11:39 
GeneralRe: Splitter windows w/o Doc/View Pin
Nish Nishant31-Oct-01 13:33
sitebuilderNish Nishant31-Oct-01 13:33 
GeneralRe: Splitter windows w/o Doc/View Pin
bumby1-Nov-01 4:12
bumby1-Nov-01 4:12 
GeneralC++ Language Problem! Pin
Joel Holdsworth31-Oct-01 10:57
Joel Holdsworth31-Oct-01 10:57 
Hi,
I have a slight problem copying a class whose pointer I have. I have an abstract base class, and several derived classes, and a pointer pointing to one of the derived classes, but the pointer is of BaseClass* type. I want to copy the derived. Can I do it using the copy constructor?

Here's a little code
class CBaseClass
{
protected:
    CBaseClass();
    CBaseClass(CBaseClass &src) {.... foo ....};
}

class CDerivedClass : public CBaseClass
{
public:
    CDerivedClass();
    CDerivedClass(CDerivedClass &src) {.... foo ....};
}

In the example how could I do this
CBaseClass *destination;
CBaseClass *source = new CDerivedClass();


.... how can I copy the "source" to "destination", and I don't mean a binary copy - there must be a proper C++ way of doing it.


With time we live, with money we spend!
Joel Holdsworth
GeneralRe: C++ Language Problem! Pin
Alvaro Mendez31-Oct-01 11:59
Alvaro Mendez31-Oct-01 11:59 
GeneralRe: C++ Language Problem! Pin
Todd Smith31-Oct-01 17:03
Todd Smith31-Oct-01 17:03 
QuestionHow can you see who called OnToolTipNeedText()? Pin
Craig Miller31-Oct-01 10:24
Craig Miller31-Oct-01 10:24 
GeneralLinking Input to an email output Pin
B-Rock31-Oct-01 9:46
B-Rock31-Oct-01 9:46 
GeneralRe: Linking Input to an email output Pin
Alex Griffing31-Oct-01 11:53
Alex Griffing31-Oct-01 11:53 
GeneralRe: Linking Input to an email output Pin
Nish Nishant31-Oct-01 13:25
sitebuilderNish Nishant31-Oct-01 13:25 
GeneralDownload/upload progress control Pin
Ashman31-Oct-01 9:19
Ashman31-Oct-01 9:19 
GeneralRe: Download/upload progress control Pin
Nish Nishant31-Oct-01 13:22
sitebuilderNish Nishant31-Oct-01 13:22 
GeneralRe: Download/upload progress control Pin
Nish Nishant31-Oct-01 13:23
sitebuilderNish Nishant31-Oct-01 13:23 
QuestionHow do I right align text in a pane? Pin
Andrew Stampor31-Oct-01 9:18
Andrew Stampor31-Oct-01 9:18 
Generalcommon open dialog size problem Pin
31-Oct-01 9:15
suss31-Oct-01 9:15 
QuestionListview and combobox questions? Margin in a combobox? Pin
mhowes31-Oct-01 8:13
mhowes31-Oct-01 8:13 
GeneralVB Active X Dll Pin
ahartoch31-Oct-01 6:50
ahartoch31-Oct-01 6:50 
GeneralRe: VB Active X Dll Pin
Michael P Butler31-Oct-01 6:55
Michael P Butler31-Oct-01 6:55 
GeneralRe: VB Active X Dll Pin
Carlos Antollini31-Oct-01 7:17
Carlos Antollini31-Oct-01 7:17 
GeneralPreventing MDI Child Wnd Resizing Pin
Chambers31-Oct-01 6:49
Chambers31-Oct-01 6:49 
GeneralRe: Preventing MDI Child Wnd Resizing Pin
Steen Krogsgaard1-Nov-01 1:35
Steen Krogsgaard1-Nov-01 1:35 

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.