Click here to Skip to main content
15,918,889 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Help: How to retrieve UNIT of a scroll bar Pin
Maximilien25-May-04 4:19
Maximilien25-May-04 4:19 
Generalprivate member in base class problem Pin
kzyczynski25-May-04 3:52
kzyczynski25-May-04 3:52 
GeneralRe: private member in base class problem Pin
Maximilien25-May-04 3:55
Maximilien25-May-04 3:55 
GeneralRe: private member in base class problem Pin
kzyczynski25-May-04 5:24
kzyczynski25-May-04 5:24 
GeneralRe: private member in base class problem Pin
jmkhael25-May-04 3:59
jmkhael25-May-04 3:59 
GeneralRe: private member in base class problem Pin
Hans Ruck25-May-04 5:04
Hans Ruck25-May-04 5:04 
QuestionHow to increase print preview area Pin
Member 16246225-May-04 3:41
Member 16246225-May-04 3:41 
Questionwhat wrong with this function template? Pin
DengJW25-May-04 2:17
DengJW25-May-04 2:17 
#include <iostream.h>

template<class t=""> T max(T a, T b)
{
if (a > b)
return(a);
else
return(b);
}

float max(float, float);
int max(int, int);

void main(void)
{
cout << "The maximum of 100 and 200 is " <<
max(100, 200) << endl;

cout << "The maximum of 5.4321 and 1.2345 is " <<
max(5.4321, 1.2345) << endl;
}

--------------------Configuration: Max_Temp - Win32 Debug--------------------
Linking...
Max_Temp.obj : error LNK2001: unresolved external symbol "int __cdecl max(int,int)" (?max@@YAHHH@Z)
Debug/Max_Temp.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.



The problem seems with 'int max(int, int);'; after comment this line, no linking error


DJ
AnswerRe: what wrong with this function template? Pin
jmkhael25-May-04 2:38
jmkhael25-May-04 2:38 
AnswerRe: what wrong with this function template? Pin
ilostmyid225-May-04 2:39
professionalilostmyid225-May-04 2:39 
AnswerRe: what wrong with this function template? Pin
DengJW25-May-04 2:47
DengJW25-May-04 2:47 
GeneralRe: what wrong with this function template? Pin
ilostmyid225-May-04 2:51
professionalilostmyid225-May-04 2:51 
GeneralRe: what wrong with this function template? Pin
DengJW25-May-04 3:14
DengJW25-May-04 3:14 
GeneralRe: what wrong with this function template? Pin
ilostmyid225-May-04 3:25
professionalilostmyid225-May-04 3:25 
GeneralRe: what wrong with this function template? Pin
DengJW25-May-04 3:36
DengJW25-May-04 3:36 
GeneralRe: what wrong with this function template? Pin
ilostmyid225-May-04 3:43
professionalilostmyid225-May-04 3:43 
AnswerRe: what wrong with this function template? Pin
Henrik Stuart25-May-04 2:49
Henrik Stuart25-May-04 2:49 
GeneralRe: what wrong with this function template? Pin
DengJW25-May-04 3:06
DengJW25-May-04 3:06 
GeneralRe: what wrong with this function template? Pin
Henrik Stuart25-May-04 3:14
Henrik Stuart25-May-04 3:14 
GeneralRe: what wrong with this function template? Pin
DengJW25-May-04 3:31
DengJW25-May-04 3:31 
GeneralRe: what wrong with this function template? Pin
Henrik Stuart25-May-04 3:54
Henrik Stuart25-May-04 3:54 
AnswerI understand now. thanks,.. ilostmyid2 , henrik and papa Pin
DengJW25-May-04 4:20
DengJW25-May-04 4:20 
Questionhow to create temporary canvas Pin
Arun AC25-May-04 2:15
Arun AC25-May-04 2:15 
AnswerRe: how to create temporary canvas Pin
Anthony_Yio25-May-04 2:22
Anthony_Yio25-May-04 2:22 
GeneralRegex Pin
shiraztk25-May-04 1:24
shiraztk25-May-04 1:24 

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.