标题:求C++编程帮忙解决error
取消只看楼主
晓宁
Rank: 1
等 级:新手上路
帖 子:22
专家分:0
注 册:2011-9-7
结帖率:71.43%
 问题点数:0 回复次数:0 
求C++编程帮忙解决error
#include<iostream.h>
#include<string.h>

class Customer;
{
    friend void displayAsFriend(Customer);
private:
    int custNum;
    double balanceDue;
public:
    Customer(int=0, double=0.0);
    void displayCustomer();
};
Customer :: Customer(int num,double balance)
{
    custNum=0;
    balanceDue=0.0;
}
void Customer :: displayCustomer()
{
    cout<<"In the member function"<<endl;
    cout<<"Customer #"<<custNum<<" has balance of RM"<<cust.custNum<<endl;
}
void Customer :: displayAsFriend(Customer cust)
{
    cout<<" In the friend function: "<<endl;
    cout<<" Customer #"<<cust.custNum<<" has a balance of RM "<<cust.balanceDue<<endl;
}

int main()
{
    Customer.onePatron(3815,259.25);
    Customer.display.Customer();
    displayAsFriend(onePatron);
}
搜索更多相关主题的帖子: void double function private balance 
2011-09-07 21:18



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




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

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