Click here to Skip to main content
15,916,842 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionMore basic C++ questions - may I ask? Pin
Vaclav_8-Oct-16 15:24
Vaclav_8-Oct-16 15:24 
AnswerRe: More basic C++ questions - may I ask? Pin
Midi_Mick8-Oct-16 15:52
professionalMidi_Mick8-Oct-16 15:52 
AnswerRe: More basic C++ questions - may I ask? Pin
Richard MacCutchan8-Oct-16 20:37
mveRichard MacCutchan8-Oct-16 20:37 
GeneralRe: More basic C++ questions - may I ask? Pin
Vaclav_9-Oct-16 6:20
Vaclav_9-Oct-16 6:20 
GeneralRe: More basic C++ questions - may I ask? Pin
Richard MacCutchan9-Oct-16 6:27
mveRichard MacCutchan9-Oct-16 6:27 
GeneralRe: More basic C++ questions - may I ask? Pin
Graham Breach9-Oct-16 21:46
Graham Breach9-Oct-16 21:46 
GeneralRe: More basic C++ questions - may I ask? Pin
Richard MacCutchan9-Oct-16 23:00
mveRichard MacCutchan9-Oct-16 23:00 
AnswerRe: More basic C++ questions - may I ask? Pin
Ratul Thakur10-Oct-16 21:42
Ratul Thakur10-Oct-16 21:42 
GeneralRe: More basic C++ questions - may I ask? Pin
David Crow11-Oct-16 6:23
David Crow11-Oct-16 6:23 
QuestionHow to initialize a CString array in MSVS C++ 2015 Pin
Member 94114717-Oct-16 8:36
Member 94114717-Oct-16 8:36 
AnswerRe: How to initialize a CString array in MSVS C++ 2015 Pin
jeron17-Oct-16 10:15
jeron17-Oct-16 10:15 
GeneralRe: How to initialize a CString array in MSVS C++ 2015 Pin
Member 941147111-Oct-16 8:48
Member 941147111-Oct-16 8:48 
GeneralRe: How to initialize a CString array in MSVS C++ 2015 Pin
Victor Nijegorodov12-Oct-16 2:57
Victor Nijegorodov12-Oct-16 2:57 
AnswerRe: How to initialize a CString array in MSVS C++ 2015 Pin
Chris Losinger8-Oct-16 6:58
professionalChris Losinger8-Oct-16 6:58 
QuestionUsing / accessing function pointer declaration externally Pin
Vaclav_6-Oct-16 11:05
Vaclav_6-Oct-16 11:05 
AnswerRe: Using / accessing function pointer declaration externally Pin
CPallini7-Oct-16 0:43
mveCPallini7-Oct-16 0:43 
GeneralRe: Using / accessing function pointer declaration externally Pin
Vaclav_7-Oct-16 17:39
Vaclav_7-Oct-16 17:39 
GeneralRe: Using / accessing function pointer declaration externally Pin
CPallini8-Oct-16 3:16
mveCPallini8-Oct-16 3:16 
AnswerRe: Using / accessing function pointer declaration externally Pin
Richard MacCutchan7-Oct-16 2:32
mveRichard MacCutchan7-Oct-16 2:32 
QuestionHow to instantiate class with parameters - syntax please ? Pin
Vaclav_2-Oct-16 5:08
Vaclav_2-Oct-16 5:08 
AnswerRe: How to instantiate class with parameters - syntax please ? Pin
Richard MacCutchan2-Oct-16 6:05
mveRichard MacCutchan2-Oct-16 6:05 
AnswerRe: How to instantiate class with parameters - syntax please ? Pin
CPallini2-Oct-16 21:20
mveCPallini2-Oct-16 21:20 
QuestionRe: How to instantiate class with parameters - syntax please ? Pin
Krishnakumartg3-Oct-16 0:07
Krishnakumartg3-Oct-16 0:07 
class A
{
public : 

    A( int p ) : a( p )
    {
    }

protected:
    int a;
};

class B
{
public:

    B( int q ) : b( q )
    {
    }

protected:
    int b;
};

class C : public A, B
{
public : 

    C( int x, int y, int z ) : A( x ), B( y), c( z )
    {
        a = x; // also possible
    }

private:

    int c;
};

int _tmain(int argc, _TCHAR* argv[])
{
    C test( 1, 2, 3 );

	return 0;
}


Will this help?
AnswerRe: How to instantiate class with parameters - syntax please ? Pin
Vaclav_3-Oct-16 5:34
Vaclav_3-Oct-16 5:34 
GeneralRe: How to instantiate class with parameters - syntax please ? Pin
leon de boer3-Oct-16 16:25
leon de boer3-Oct-16 16:25 

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.