标题:各位高手帮忙看看它错在哪
取消只看楼主
张堪绘
Rank: 1
等 级:新手上路
帖 子:15
专家分:6
注 册:2013-4-13
结帖率:100%
已结贴  问题点数:20 回复次数:0 
各位高手帮忙看看它错在哪
#include<iostream>
using namespace std;
#define PI 3.14
class cylinder{
public:
    cylinder(double r,double h);
    double vol();
private:
    double radius;
    double height;
};
cylinder::cylinder(double r,double h);
{radius=r;height=h;}
double cylinder::vol()
{cout<<PI*radius*radius*height<<endl;}
int main()
{ int n;cylinder voln;
cout<<"The volume of cylimder is"<<voln.vol()<<endl;return 0;}
搜索更多相关主题的帖子: private public double 
2013-04-20 00:04



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




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

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