Cannot declare cocos2d objects in a header file


#1

Hi,
I have a header file which looks like this:
@
#include “cocos2d.h”

class Bomb
{
private:
CCSprite* bomb;
CCLayer* fatherLayer;
.
.
.
@

But, when I compile the code the terminal print this error:

error: ‘CCSprite’ does not name a type

However, I can use these objects from the init function in the cpp file.

Do you know where the problem cames from?


#2

using namespace cocos2d;