Click here to Skip to main content
15,905,071 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionAbout DirectX??? Pin
siddharthsan28-Feb-07 21:18
siddharthsan28-Feb-07 21:18 
AnswerRe: About DirectX??? Pin
Mark Salsbery1-Mar-07 8:00
Mark Salsbery1-Mar-07 8:00 
QuestionNeed to draw background of edit control Pin
Nishad S28-Feb-07 21:16
Nishad S28-Feb-07 21:16 
AnswerRe: Need to draw background of edit control Pin
baerten28-Feb-07 22:41
baerten28-Feb-07 22:41 
GeneralRe: Need to draw background of edit control Pin
Nishad S28-Feb-07 23:39
Nishad S28-Feb-07 23:39 
AnswerRe: Need to draw background of edit control Pin
Hamid_RT28-Feb-07 23:35
Hamid_RT28-Feb-07 23:35 
Questionnew operator Pin
prithaa28-Feb-07 21:07
prithaa28-Feb-07 21:07 
AnswerRe: new operator Pin
Cedric Moonen28-Feb-07 21:16
Cedric Moonen28-Feb-07 21:16 
prithaa wrote:
But If I have a template class B whose type is A* then
while initializing the template class B the constructor A() has to be called.


Then you need to do it. I think you should first review how template works, this has nothing to do with inheritance.
How is your template 'parameter' used ? Is it a template member of your class B ? Something like this:

template <class T>
class B
{
...
...

T* m_Object;
};


And used this way ?
B<A> classB;


If yes, then you will need to instanciate the object in the constructor of B.

But, this highly depends of how you are using your template... Can you post some code so that we have a better view of your problem ?







Cédric Moonen
Software developer

Charting control [v1.1]

GeneralRe: new operator Pin
prithaa28-Feb-07 21:56
prithaa28-Feb-07 21:56 
Questionhow to use SetPrinterDataEx() Pin
mo_nica88128-Feb-07 20:58
mo_nica88128-Feb-07 20:58 
AnswerRe: how to use SetPrinterDataEx() Pin
prasad_som28-Feb-07 23:13
prasad_som28-Feb-07 23:13 
Questionnew operator not understood Pin
prithaa28-Feb-07 20:01
prithaa28-Feb-07 20:01 
AnswerRe: new operator not understood Pin
Cedric Moonen28-Feb-07 20:13
Cedric Moonen28-Feb-07 20:13 
SuggestionRe: new operator not understood Pin
Pranit Kothari27-Oct-11 19:14
Pranit Kothari27-Oct-11 19:14 
GeneralRe: new operator not understood Pin
Cedric Moonen27-Oct-11 20:19
Cedric Moonen27-Oct-11 20:19 
AnswerRe: new operator not understood Pin
ThatsAlok28-Feb-07 20:27
ThatsAlok28-Feb-07 20:27 
GeneralRe: new operator not understood Pin
Stephen Hewitt28-Feb-07 20:32
Stephen Hewitt28-Feb-07 20:32 
GeneralRe: new operator not understood Pin
prithaa28-Feb-07 20:44
prithaa28-Feb-07 20:44 
QuestionMultithreading in VC++ Pin
Karismatic28-Feb-07 19:54
Karismatic28-Feb-07 19:54 
AnswerRe: Multithreading in VC++ Pin
ThatsAlok28-Feb-07 20:00
ThatsAlok28-Feb-07 20:00 
GeneralRe: Multithreading in VC++ Pin
Hamid_RT28-Feb-07 20:09
Hamid_RT28-Feb-07 20:09 
GeneralRe: Multithreading in VC++ Pin
ThatsAlok28-Feb-07 20:24
ThatsAlok28-Feb-07 20:24 
AnswerRe: Multithreading in VC++ Pin
ThatsAlok28-Feb-07 20:24
ThatsAlok28-Feb-07 20:24 
AnswerRe: Multithreading in VC++ Pin
Hamid_RT28-Feb-07 20:42
Hamid_RT28-Feb-07 20:42 
QuestionConvert from SDI to MDI application in VC++ Pin
Karismatic28-Feb-07 19:48
Karismatic28-Feb-07 19:48 

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.