65,211
社区成员
发帖
与我相关
我的任务
分享
#ifndef H1_H
#define H1_H
template <class T> T com (const T & , const T & );
#include "h1.cpp"
#endif H1_H//H1_H
#ifndef H1_CPP
#define H1_CPP
#include "h1.h"
template <class T> T com (const T & t1 , const T & t2 )
{
if (t1>=t2)
return t1;
else
return t2;
}
#endif H1_CPP //H1_CPP
#include <iostream>
#include "h1.h"
int main()
{
std::cout << com(7,9) << std::endl;
}