[ create a new paste ] login | about

Link: http://codepad.org/rETFoL0l    [ raw code | output | fork ]

C++, pasted on Feb 9:
#include <cstdio>

class Charater1
{
public:
	enum MotionType
	{
		STANDING = 0,
		RUNNING,
		JUMPING,
		DIED,
		MAX_MOTION_TYPE
	};
	int a;
	int b;
};

class Charater2
{
public:
	enum MotionType
	{
		STANDING = 0,
		RUNNING,
		JUMPING,
		DIED,
		MAX_MOTION_TYPE
	};
	int a;
	int b;
	MotionType motionType;
};

int main()
{
	printf("%d, %d\n", sizeof(Charater1), sizeof(Charater2));
}


Output:
1
8, 12


Create a new paste based on this one


Comments: