Pointer in struct hands me syntax error.

Severity Code Description Project File Line Suppression State
Error C2143 syntax error: missing ';' before '*' Ares Engine d:\shared\ares engine\ares engine\ares engine\entity component system\component.h 12

line 12 is Entity* entity;

1
2
3
4
5
6
7
8
9
10
11
		struct Component
		{
		public:
			Entity* entity;

			virtual void init() {}
			virtual void update(float mFT) {}
			virtual void draw() {}

			virtual ~Component() {}
		};
Last edited on
The syntax of your code is ok.
It seems the compiler doesn't know anything about Entity.
Where is it declared? Have you included all files in your project?
Topic archived. No new replies allowed.