zoukankan      html  css  js  c++  java
  • error C2143: 语法错误 : 缺少“;”(在“using”的前面)

    class JJMenuScene : public cocos2d::CCLayer
    {
        public:
        // Here's a difference. Method 'init' in cocos2d-x returns bool, instead of returning 'id' in cocos2d-iphone
        virtual bool init();  
    
        // there's no 'id' in cpp, so we recommand to return the exactly class pointer
        static cocos2d::CCScene* scene();
    }

    之前的C++自从开发android以后,都差不多丢光了,今天遇到一个问题,就是C2143,把基础的也忘记了,该再去补一下基础的内容了。

    需要在类后面添加一个冒号;

    class JJMenuScene : public cocos2d::CCLayer
    {
        public:
        // Here's a difference. Method 'init' in cocos2d-x returns bool, instead of returning 'id' in cocos2d-iphone
        virtual bool init();  
    
        // there's no 'id' in cpp, so we recommand to return the exactly class pointer
        static cocos2d::CCScene* scene();
    };
  • 相关阅读:
    HDU 1496 Equations
    HDU 1060 Leftmost Digit
    HDU 1391 Number Steps
    HDU 1212 Big Number
    HDU 1491 Octorber 21st
    HDU 1339 A Simple Task
    HDU 2710 Max Factor
    HDU 1176 免费馅饼
    FORTH基本堆栈操作
    FORTH 安装使用
  • 原文地址:https://www.cnblogs.com/yuan19/p/3272813.html
Copyright © 2011-2022 走看看