标题:问个题啊
取消只看楼主
bych
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2005-11-1
 问题点数:0 回复次数:0 
问个题啊

#include<iostream.h>
template <class Ta,class Tb,class Tc>
Ta temp(const Ta &Cfist,const Tc &Cschar,const Tb &Clast)

{
Ta first=Cfist;
Tb last=Clast;
Tc fC=Cschar;
switch(fC)
{
case '+' :cout<< (ffisst+flast);
break;
case '-':cout<<(ffisst-flast);
break;
case '/' :cout<< (ffisst/flast);
break;
case '*' :cout<< (ffisst*flast);
break;
default : cout<<"Error!!!schar!!"<<endl;

}

}
int main()
{
int first;
int last;
char schar;
cout<<"Please input :"<<endl;
cout<<"first=";
cin>>first;
cout<<endl;
cout<<"schar=";
cin>>schar;
cout<<endl;
cout<<"last=";
cin>>last;
cout<<endl;

cout<<"The resurlt is:"<<first<<scahr<<last<<"="<<temp(first,schar,last)<<endl;
return 0;

}
有一个错误找不出来呀,,高手指点下啦!!

搜索更多相关主题的帖子: include 
2005-11-05 13:59



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-32707-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.088746 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved