Click here to Skip to main content
16,013,825 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Delete file problem Pin
Mike Nordell28-May-02 23:41
Mike Nordell28-May-02 23:41 
GeneralRe: Delete file problem Pin
29-May-02 1:53
suss29-May-02 1:53 
Questionhow can i keep my EXE file's integerity? Pin
tiaozi28-May-02 22:46
tiaozi28-May-02 22:46 
AnswerRe: how can i keep my EXE file's integerity? Pin
Mike Nordell28-May-02 22:52
Mike Nordell28-May-02 22:52 
AnswerRe: how can i keep my EXE file's integerity? Pin
Martin Ziacek28-May-02 23:27
Martin Ziacek28-May-02 23:27 
GeneralMS Excel automation Pin
28-May-02 22:53
suss28-May-02 22:53 
GeneralRe: MS Excel automation Pin
KarstenK29-May-02 0:14
mveKarstenK29-May-02 0:14 
QuestionSimple template function question? Pin
28-May-02 22:12
suss28-May-02 22:12 
Hi, everyone!

I have define the below template function:

template <class t=""> void MyFuction(T* Para)
{
if(sizeof(T) == sizeof(MyClassA))
Para->Method_Of_MyClassA();
else
Para->Method_Of_MyClassB();
...
}

To use this template class, I will pass pointer of MyClassA and MyClassB
as a parameter to it;
eg.

MyFuction<myclassa>(pMyClassA);
MyFuction<myclassb>(pMyClassB);

But I got compiler error saying Method_Of_MyClassA() not a member MyClassB
and Method_Of_MyClassB() not a member MyClassA.

Does anyone know how to overcome this problem?

Best Regards,
Wayne King
AnswerRe: Simple template function question? Pin
Mike Nordell28-May-02 23:00
Mike Nordell28-May-02 23:00 
AnswerRe: Simple template function question? Pin
Rutger Ellen28-May-02 23:54
Rutger Ellen28-May-02 23:54 
AnswerRe: Simple template function question? Pin
_Magnus_29-May-02 0:14
_Magnus_29-May-02 0:14 
AnswerRe: Simple template function question? Pin
29-May-02 2:32
suss29-May-02 2:32 
GeneralRe: Simple template function question? Pin
Rutger Ellen29-May-02 3:36
Rutger Ellen29-May-02 3:36 
GeneralRe: Simple template function question? Pin
30-May-02 16:12
suss30-May-02 16:12 
GeneralMAKEWPARAM Pin
Arjan Schouten28-May-02 21:41
Arjan Schouten28-May-02 21:41 
GeneralRe: MAKEWPARAM Pin
Arjan Schouten28-May-02 23:23
Arjan Schouten28-May-02 23:23 
GeneralRe: MAKEWPARAM Pin
Mike Nordell28-May-02 23:40
Mike Nordell28-May-02 23:40 
GeneralRe: MAKEWPARAM Pin
Alex Cramer29-May-02 0:01
Alex Cramer29-May-02 0:01 
GeneralRe: MAKEWPARAM Pin
Arjan Schouten29-May-02 0:05
Arjan Schouten29-May-02 0:05 
Generalsize and position of a control like a button or static text. Pin
aldeba28-May-02 21:26
aldeba28-May-02 21:26 
GeneralRe: size and position of a control like a button or static text. Pin
Eugene Pustovoyt28-May-02 21:36
Eugene Pustovoyt28-May-02 21:36 
GeneralRe: size and position of a control like a button or static text. Pin
Mike Nordell28-May-02 21:33
Mike Nordell28-May-02 21:33 
GeneralRe: size and position of a control like a button or static text. Pin
Joaquín M López Muñoz28-May-02 21:42
Joaquín M López Muñoz28-May-02 21:42 
GeneralRe: size and position of a control like a button or static text. Pin
aldeba28-May-02 21:58
aldeba28-May-02 21:58 
GeneralRe: size and position of a control like a button or static text. Pin
Mike Nordell28-May-02 22:51
Mike Nordell28-May-02 22:51 

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.