标题:初学者求教error c2679
取消只看楼主
G梦
Rank: 1
等 级:新手上路
帖 子:48
专家分:7
注 册:2012-12-27
结帖率:88.89%
已结贴  问题点数:20 回复次数:2 
初学者求教error c2679
error C2679: binary '>>' : no operator defined which takes a right-hand operand of type '' (or there is no acceptable conversion)
Error executing cl.exe.
这个错误肿么破
搜索更多相关主题的帖子: conversion 
2013-02-24 21:33
G梦
Rank: 1
等 级:新手上路
帖 子:48
专家分:7
注 册:2012-12-27
得分:0 
附上代码:#include<iostream>
using namespace std;
int Hn( int n,float x);
int main()
{
    int n,i;
    float s,x;
    cin>>n>>endl;
    cin>>x>>endl;
    for(i=0;i<=n;i++)
    {
        s=Hn(i,x);
        cout<<s<<endl;
    }
    return 0;
}
      

 int Hn(int n, float x)
    {
      
        float k;
        if (n==0)
            k=1;
        else if (n==1)
            k=2*x;
        else  
            k=2*x*Hn(n-1,x)-2*(n-1)*Hn(n-2,x);  
        return k;
    }
2013-02-24 21:41
G梦
Rank: 1
等 级:新手上路
帖 子:48
专家分:7
注 册:2012-12-27
得分:0 
哈哈 我搞定了
自娱自乐好了
2013-02-24 22:42



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




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

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