我在程序中有一个类通知,我在这个项目的其他类中使用它.当我在Visual Studio 2010中运行时它没问题.但是当使用Cygwin构建时发生此错误"错误:预期不合格的ID'不'令牌之前"这个我的类文件.h
#ifndef __TOAST_H__
#define __TOAST_H__
#include "cocos2d.h"
#include "cocos-ext.h"
USING_NS_CC_EXT;
USING_NS_CC;
#define LOADING 1
class notificationTOAST: public CCLayer{
public:
notificationTOAST(char* bg, char* txt, float y, float duringTime, CCObject* target);
notificationTOAST(char* bg, char* txt, float y, float duringTime, CCObject* target,char* imgLoading);
notificationTOAST(char* bg, char* txt, float duringTime, CCObject* target);
notificationTOAST(char* bg, char* txt, float x, float y, float duringTime, CCObject* target);
notificationTOAST(char* bg, char* txt,float x, float y, float duringTime, CCObject* target,char* imgLoading);
void end();
virtual void loop(float id); …Run Code Online (Sandbox Code Playgroud) 如果我定义如下的结构
typedef struct Coder {
float **data;
};
Run Code Online (Sandbox Code Playgroud)
为方便起见,我还定义了一个指向这个结构的指针
typedef Coder *AUTO;
Run Code Online (Sandbox Code Playgroud)
然后我必须通过调用来初始化它
AUTO myInstance = new Coder;
Run Code Online (Sandbox Code Playgroud)
我打电话时出现问题
myInstance->data= NULL;
Run Code Online (Sandbox Code Playgroud)
VC 2010告诉我没有类型说明符.我不明白这里有什么问题.请你帮助我好吗?