/* * ===================================================================================== * * Filename: funtemp.cpp * * Description: none * * Version: 1.0 * Created: 2010/1/17 13:32:28 * Revision: none * Compiler: gcc * * Author: bird * Company: nbut * * ===================================================================================== */ #include <iostream> #include <stdlib.h> using namespace std; template<class t> t fun(t a){ return a*2; } int main ( int argc, char *argv[] ) { cout<<fun(8)<<endl; cout<<fun(7.7)<<endl; return EXIT_SUCCESS; } /* ---------- end of function main ---------- */