#ifndef CUPCAKE
#define CUPCAKE
#include “cocos2d.h”
#include “MainMenu.h”
using namespace std;
using namespace cocos2d;
enum Flavor
{
FlavorChocolate, FlavorVanilla, FlavorStrawberry
};
enum IcingColor
{
IcingChocolate, IcingVanilla, IcingStrawberry
};
enum Topping
{
start, love, chocolateRice
};
class Cupcake : public CCLayer
{
private:
Flavor flavor; //untuk guna enum variable
IcingColor icing;
Topping topping;
public:
bool init(Flavor flavor);
void moveTo(CCPoint position);
Flavor getFlavor();
void bake();
void setIcing(IcingColor icing);
void setToppping(Topping toppping);
CREATE_FUNC(Cupcake); <——ERROR
};
#endif
Why the error said that ‘Cupcake::init’ : function does not take 0 arguments. Still can’t find the reason and how to change it. Can somebody help me?