This topic has been archived. It cannot be replied.
-
工作学习 / IT技术讨论 / C++中模板函数的重载
-davidofmine(david);
2001-6-25
{623}
(#111900@0)
-
The program won't link because the two functions int max(int, int) and char max(char, char) are not defined.In order to tell compiler that you are using a templated function, you have put the angle bracket after the function name: cout<<max<int>(i,i)<<encl;
-numnum(numnum);
2001-6-26
{150}
(#112497@0)
-
C++中模板函数的重载
-davidofmine(david);
2001-6-26
{1022}
(#112705@0)
-
What does GNU mean?…..In some compilers, they don’t need to be defined. But only one of them can be declared. You won’t pass compilation if you declare both int max(int, int); and char max(char, char); The compiler tries to match explicitly declared functions first, then try the template. If No match can be found, return +.
-tonyliang99(tony);
2001-6-26
{308}
(#112670@0)
-
GNU's Not Unix! see www.gnu.org
-jfhuang(Zigzag);
2001-6-27
(#113325@0)