Click here to Skip to main content
15,913,205 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Member Function Template [modified] Pin
Nelek30-Jul-07 20:54
protectorNelek30-Jul-07 20:54 
GeneralRe: Member Function Template Pin
Andy Rama30-Jul-07 21:00
Andy Rama30-Jul-07 21:00 
GeneralRe: Member Function Template Pin
Andy Rama30-Jul-07 21:09
Andy Rama30-Jul-07 21:09 
GeneralRe: Member Function Template Pin
Andy Rama30-Jul-07 21:22
Andy Rama30-Jul-07 21:22 
GeneralRe: Member Function Template Pin
Nelek30-Jul-07 21:39
protectorNelek30-Jul-07 21:39 
GeneralRe: Member Function Template Pin
jhwurmbach30-Jul-07 22:10
jhwurmbach30-Jul-07 22:10 
GeneralRe: Member Function Template Pin
Nelek30-Jul-07 23:56
protectorNelek30-Jul-07 23:56 
AnswerRe: Member Function Template Pin
Nelek30-Jul-07 21:12
protectorNelek30-Jul-07 21:12 
Try with...

template< class T >
class CProg
{
public :
int val;
void SetVal(int y);
void AddValues(T a, T b);
};

template< class T >
inline void CProg< class T >::SetVal(int y)
{
val = y;
}

template< class T >
inline T CProg< class T >::AddValues(T a, T b)
{
return (T) (a + b);
}



EDIT: Some corrections, like empty space between < > and class T, so the web doesn't take them as labels for format.


Greetings.

--------
M.D.V.

If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?

QuestionCString accumulation Pin
tom groezer30-Jul-07 20:40
tom groezer30-Jul-07 20:40 
AnswerRe: CString accumulation Pin
Rage30-Jul-07 20:59
professionalRage30-Jul-07 20:59 
AnswerRe: CString accumulation Pin
Joe Smith IX30-Jul-07 21:19
Joe Smith IX30-Jul-07 21:19 
QuestionRegarding Interview Pin
tasumisra30-Jul-07 20:26
tasumisra30-Jul-07 20:26 
AnswerRe: Regarding Interview Pin
mandanani30-Jul-07 20:31
mandanani30-Jul-07 20:31 
GeneralRe: Regarding Interview Pin
Nelek30-Jul-07 21:42
protectorNelek30-Jul-07 21:42 
AnswerRe: Regarding Interview Pin
David Crow31-Jul-07 2:55
David Crow31-Jul-07 2:55 
QuestionGDI Object count Pin
Nishad S30-Jul-07 20:11
Nishad S30-Jul-07 20:11 
AnswerRe: GDI Object count Pin
mandanani30-Jul-07 20:30
mandanani30-Jul-07 20:30 
GeneralRe: GDI Object count Pin
Nishad S30-Jul-07 20:57
Nishad S30-Jul-07 20:57 
QuestionOpenFile Pin
nitin330-Jul-07 19:12
nitin330-Jul-07 19:12 
AnswerRe: OpenFile Pin
prasad_som30-Jul-07 19:21
prasad_som30-Jul-07 19:21 
QuestionRe: OpenFile Pin
nitin330-Jul-07 19:57
nitin330-Jul-07 19:57 
AnswerRe: OpenFile Pin
Hamid_RT31-Jul-07 21:17
Hamid_RT31-Jul-07 21:17 
QuestionHow to change the size of the default scrollbar Pin
Nishad S30-Jul-07 18:39
Nishad S30-Jul-07 18:39 
AnswerRe: How to change the size of the default scrollbar Pin
Hans Dietrich30-Jul-07 20:07
mentorHans Dietrich30-Jul-07 20:07 
GeneralRe: How to change the size of the default scrollbar Pin
Nishad S30-Jul-07 20:15
Nishad S30-Jul-07 20:15 

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.