Click here to Skip to main content
15,936,897 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to use IcmpCreateFile(); Pin
Randor 26-Oct-09 10:48
professional Randor 26-Oct-09 10:48 
GeneralRe: How to use IcmpCreateFile(); Pin
Manmohan2926-Oct-09 17:08
Manmohan2926-Oct-09 17:08 
Questioninheritance Pin
khomeyni26-Oct-09 9:40
khomeyni26-Oct-09 9:40 
AnswerRe: inheritance Pin
David Crow26-Oct-09 9:54
David Crow26-Oct-09 9:54 
GeneralRe: inheritance Pin
khomeyni27-Oct-09 6:19
khomeyni27-Oct-09 6:19 
QuestionRe: inheritance Pin
David Crow27-Oct-09 6:30
David Crow27-Oct-09 6:30 
AnswerRe: inheritance Pin
khomeyni27-Oct-09 6:56
khomeyni27-Oct-09 6:56 
GeneralRe: inheritance Pin
David Crow27-Oct-09 7:36
David Crow27-Oct-09 7:36 
khomeyni wrote:
you said there is another way for this. please say what i must to do?


I've not sure if it is the correct way, but one option would be:

class BaseContainer
{
public:
    BaseMember *m_instance;
    
    BaseContainer()
    {
        m_instance = new BaseMember();
    }
    
    BaseContainer( DerivedMemer *d )
    {
        m_instance = d;
    }
};
  
class DerivedContainer : public BaseContainer
{
public:
    DerivedContainer() : BaseContainer( new DerivedMemer )
    {
    }
};
  
void main( void )
{
    DerivedContainer der;
    BaseContainer bas;
}
This is a part of C++ that I've never had to bother/worry about.

"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown

"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons


GeneralRe: inheritance Pin
khomeyni28-Oct-09 20:54
khomeyni28-Oct-09 20:54 
QuestionThread buttons Pin
Nikz226-Oct-09 6:37
Nikz226-Oct-09 6:37 
QuestionRe: Thread buttons Pin
David Crow26-Oct-09 6:45
David Crow26-Oct-09 6:45 
AnswerRe: Thread buttons Pin
Nikz226-Oct-09 7:26
Nikz226-Oct-09 7:26 
Questionhow to convert tiff to pdf it's urgent Pin
eswar pothula26-Oct-09 5:23
eswar pothula26-Oct-09 5:23 
QuestionRe: how to convert tiff to pdf it's urgent Pin
CPallini26-Oct-09 5:41
mveCPallini26-Oct-09 5:41 
AnswerRe: how to convert tiff to pdf it's urgent Pin
David Crow26-Oct-09 6:04
David Crow26-Oct-09 6:04 
AnswerRe: how to convert tiff to pdf it's urgent Pin
Chris Losinger26-Oct-09 11:10
professionalChris Losinger26-Oct-09 11:10 
AnswerRe: how to convert tiff to pdf it's urgent Pin
Hariharasudhan R26-Oct-09 16:10
Hariharasudhan R26-Oct-09 16:10 
QuestionUnicode problem Pin
m_mun26-Oct-09 4:12
m_mun26-Oct-09 4:12 
AnswerRe: Unicode problem Pin
Hristo-Bojilov26-Oct-09 4:25
Hristo-Bojilov26-Oct-09 4:25 
GeneralRe: Unicode problem Pin
Nemanja Trifunovic26-Oct-09 4:34
Nemanja Trifunovic26-Oct-09 4:34 
GeneralRe: Unicode problem Pin
Hristo-Bojilov26-Oct-09 4:58
Hristo-Bojilov26-Oct-09 4:58 
GeneralRe: Unicode problem [modified] Pin
Nemanja Trifunovic26-Oct-09 5:25
Nemanja Trifunovic26-Oct-09 5:25 
GeneralRe: Unicode problem Pin
David Crow26-Oct-09 6:08
David Crow26-Oct-09 6:08 
GeneralRe: Unicode problem Pin
Nemanja Trifunovic26-Oct-09 6:30
Nemanja Trifunovic26-Oct-09 6:30 
GeneralUniversal character names Pin
Nemanja Trifunovic26-Oct-09 7:43
Nemanja Trifunovic26-Oct-09 7:43 

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.