为了账号安全,请及时绑定邮箱和手机立即绑定

为什么总显示missing‘;’before ‘}’


#include<iostream>

#include <stdlib.h>

using namespace std;

class Coordinate

{

public:int x;

  int y;

  void printX()

  {

  cout<<x<<endl;

  };

  void printY()

  {

  cout<<y<<endl;

  }

};

int main(void)

{

/*Coordinate coor;

coor.x=10;

coor.y=20;

coor.printX();

coor.printY();*/


Coordinate *p=new Cooridnate();

    

p->x = 100;

p->y = 200;

p->printX();

//P->printY();

// delete p;

//p=NULL;

// system("pause");

return 0;

}


正在回答

1 回答

missing到没看出来,多了一个;倒是不假

0 回复 有任何疑惑可以回复我~
#1

等候稻香 提问者

谢谢啊
2015-08-19 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消
C++远征之封装篇(上)
  • 参与学习       103381    人
  • 解答问题       732    个

封装--面向对象的基石,本教程力求帮助小伙伴们即学即会

进入课程

为什么总显示missing‘;’before ‘}’

我要回答 关注问题
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号