Click here to Skip to main content
15,899,754 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: HOWDOI: Enumerate Group Membership on Windows 98 Pin
Brian Shifrin28-Apr-03 23:58
Brian Shifrin28-Apr-03 23:58 
GeneralMore templates problems Pin
grscot28-Apr-03 14:58
grscot28-Apr-03 14:58 
GeneralRe: More templates problems Pin
HJo29-Apr-03 1:54
HJo29-Apr-03 1:54 
GeneralSquare control in MFC Dialog Pin
pitts28-Apr-03 13:23
pitts28-Apr-03 13:23 
GeneralRe: Square control in MFC Dialog Pin
Brian Shifrin28-Apr-03 14:24
Brian Shifrin28-Apr-03 14:24 
GeneralRe: Square control in MFC Dialog Pin
pitts29-Apr-03 3:28
pitts29-Apr-03 3:28 
GeneralRe: Square control in MFC Dialog Pin
Hans Dietrich28-Apr-03 18:49
mentorHans Dietrich28-Apr-03 18:49 
Generalanother template question Pin
grscot28-Apr-03 13:16
grscot28-Apr-03 13:16 
Dear all,

I 've understood that the template function for the two functions :
int AddNumbers(int a, int b);
float AddFloats(float a, float b);

is: template<class T>
T Add(const T &a, const T&b)
{
return a+b;
}
because the arguments' return type is the same as the functions' return type.

But what is the template function when the return type of the arguments is different from the return type of the function?
For example:
Member* get_member(Book* book);
Book* get_book(Member* member);

What is now the template function of the two above functions?

Regards,
grscot

GeneralRe: another template question Pin
Phil Hamer28-Apr-03 13:33
Phil Hamer28-Apr-03 13:33 
GeneralCFile::Open access denied error Pin
IGx8928-Apr-03 12:35
IGx8928-Apr-03 12:35 
GeneralRe: CFile::Open access denied error Pin
Brian Shifrin28-Apr-03 13:07
Brian Shifrin28-Apr-03 13:07 
GeneralRe: CFile::Open access denied error Pin
IGx8929-Apr-03 12:42
IGx8929-Apr-03 12:42 
GeneralCHtmlCtrl Pin
Florin Ochiana28-Apr-03 10:49
Florin Ochiana28-Apr-03 10:49 
GeneralRe: CHtmlCtrl Pin
Brian Shifrin28-Apr-03 13:11
Brian Shifrin28-Apr-03 13:11 
GeneralEasy question but difficult answer Pin
VietDelphi28-Apr-03 9:53
VietDelphi28-Apr-03 9:53 
GeneralRe: Easy question but difficult answer Pin
John M. Drescher28-Apr-03 10:55
John M. Drescher28-Apr-03 10:55 
GeneralMDI question (when closing MDI Child windows) Pin
Maximilien28-Apr-03 9:29
Maximilien28-Apr-03 9:29 
GeneralRe: MDI question (when closing MDI Child windows) Pin
Brian Shifrin28-Apr-03 13:28
Brian Shifrin28-Apr-03 13:28 
GeneralTemplate question problem Pin
grscot28-Apr-03 8:21
grscot28-Apr-03 8:21 
GeneralRe: Template question problem Pin
Chris Losinger28-Apr-03 8:31
professionalChris Losinger28-Apr-03 8:31 
GeneralPrinting Question for Roger Allen Pin
doctorpi28-Apr-03 6:19
doctorpi28-Apr-03 6:19 
GeneralRe: Printing Question for Roger Allen Pin
Roger Allen29-Apr-03 2:40
Roger Allen29-Apr-03 2:40 
GeneralRe: Printing Question for Roger Allen Pin
doctorpi29-Apr-03 5:05
doctorpi29-Apr-03 5:05 
QuestionHow to read command line parameters Pin
gmlnd28-Apr-03 6:10
gmlnd28-Apr-03 6:10 
AnswerRe: How to read command line parameters Pin
Hans Dietrich28-Apr-03 7:30
mentorHans Dietrich28-Apr-03 7:30 

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.