标题:一个小程序中的问题 请大家指教下
取消只看楼主
xdztc
Rank: 1
等 级:新手上路
帖 子:12
专家分:0
注 册:2007-1-7
 问题点数:0 回复次数:2 
一个小程序中的问题 请大家指教下

我想请问个问题
#include <iostream.h>
class Piont
{
public:
Point(int xx=0,int yy=0){X=xx;Y=yy;countpc++;} 第五行
point(point&P);
int GetX(){return X;}
int GetY(){return Y;}
void GetC(){cout<<''Object id=''}<<countP<<endl;}
private:
intX,Y;
static int countP;
};
Point::Point(Point&p)
{
X=p.X;
Y=p.Y;
countp++;
}

int Point::countp=0;
void main()
{
Point A(4,5);
cout<<''Point A,''<<A.GetX()<<'',''<<A.GetY90;
A.GetC();
Point B(A);
cout<<''Point B,''<<B.GetX()<<'','<<B.GetY();
B.GetC();
}


第五行红字countpC++ 是什么意思

谢谢

搜索更多相关主题的帖子: 指教 
2007-01-25 08:23
xdztc
Rank: 1
等 级:新手上路
帖 子:12
专家分:0
注 册:2007-1-7
得分:0 

但是后面没有出现countpc++啊 只出现了countp++

2007-01-25 08:50
xdztc
Rank: 1
等 级:新手上路
帖 子:12
专家分:0
注 册:2007-1-7
得分:0 
怎么还不回啊
2007-01-25 09:38



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




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

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