[英]Why am I getting “missing ';' before '*' ”?
我是C ++的新手,並且正在使用cocos2d-x
我只想在.h文件中創建一個簡單的Size屬性,以便在實現中使用不同的方法來保持其狀態。
我在這里想念什么?
#ifndef __INTROBETTER_SCENE_H__
#define __INTROBETTER_SCENE_H__
#include "cocos2d.h"
class IntroBetterScene : public cocos2d::Layer
{
public:
// there's no 'id' in cpp, so we recommend returning the class instance pointer
static cocos2d::Scene* createScene();
// Here's a difference. Method 'init' in cocos2d-x returns bool, instead of returning 'id' in cocos2d-iphone
virtual bool init();
// a selector callback
void menuCloseCallback(cocos2d::Ref* pSender);
// implement the "static create()" method manually
CREATE_FUNC(IntroBetterScene);
private:
void GoToMainMenuScene(float dt);
Size* sizeWindow;
};
#endif //__INTROBETTER_SCENE_H__
因為您沒有指定正確的范圍。 當前作用域中沒有class Size
。 您需要使用cocos2d::Size
。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.