标题:总有一处错误 求改错
取消只看楼主
tlj
Rank: 1
等 级:新手上路
帖 子:8
专家分:2
注 册:2014-2-28
结帖率:100%
已结贴  问题点数:20 回复次数:2 
总有一处错误 求改错
#include<iostream>
using namespace std;
class RMB{
public:
    void setmoney(int newY=8,int newJ=7,int newF=5);
    void showmoney();
private:
    int Yuan,Jiao,Fen;
};
void RMB::setmoney(int newY,int newJ,int  newF){
    Yuan=newY;
    Jiao=newJ;
    Fen=newF;
}
inline void RMB::showmoney(){
    cout<<Yuan<<":"<<Jiao<<":"<<Fen<<endl;
}
int main(){
    RMB myRMB;
    cout<<"first money set and output:"<<endl;
    myRMB.setmoney();
    myRMBshowmoney();
    cout<<second  money set and output:"<<endl;
    myRMB setmoney(3,4,6);
    myRMB showmoney();
    return 0;
}
搜索更多相关主题的帖子: private include public second money 
2014-03-12 22:28
tlj
Rank: 1
等 级:新手上路
帖 子:8
专家分:2
注 册:2014-2-28
得分:0 
回复 2楼 rjsp
谢谢指导
2014-03-13 22:23
tlj
Rank: 1
等 级:新手上路
帖 子:8
专家分:2
注 册:2014-2-28
得分:0 
回复 5楼 Susake
初学者   当局者迷
2014-03-14 19:42



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




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

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