帮我看下哪又出错了?我找不出来啊
/**************************/
类文件:
class Love
{
public:
Love(){};
Love(int theNomber,double theDollars);
double getNomber1()const;
double getNomber2()const;
double getNomber3()const;
double getNomber4()const;
double getNomber5()const;
double getLove()const;
private:
int nomber;
double dollars;
};
Love::Love(int theNomber,double theDollars)
{
nomber=theNomber;
dollars=theDollars;
}
inline double Love::getNomber1()const
{
if(dollars<10.0)
return dollars*nomber;
else if(dollars>10&&dollars<100.0)
return dollars*nomber*(1-0.02);
else if(dollars>100.0)
return dollars*nomber*(1-0.05);
return 0;
}
/***********************************/
驱动程序:
#include<iostream>
#include"Love.h"
using namespace std;
void main()
{
Love love(100,100.0);
cout<<love.getNomber1()<<endl;
}