Article ID: 143081
Article Last Modified on 7/5/2005
/* Compile options needed: /c */
// This Min is in error (no return type is specified)
template <class X> Min (X &t1, X &t2) {
if (t1<t2) return t1;
return t2;
} //the error message appears for this line
//This Min is correct
template <class X> X& Min (X &t1, X &t2) {
if (t1<t2) return t1;
return t2;
}
Keywords: kbprb kbcpponly kbcompiler KB143081