0.0 0


#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
Flavor flavor; //untuk guna enum variable
IcingColor icing;
Topping topping;

bool init(Flavor flavor);
void moveTo(CCPoint position);
Flavor getFlavor();
void bake();
void setIcing(IcingColor icing);
void setToppping(Topping toppping);



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?


init has no arguments. You must change your init to Myinit or other.