Sign in to follow this  

Bah! Dynamic Array (Vector) Problems ...

Recommended Posts

I'm getting the fallowing error whenever I try to use vectors inside my class definition. c:\Documents and Settings\Zmurf\My Documents\Visual Studio\Projects\Peevish\Game.h(25): error C2143: syntax error : missing ';' before '<' Here is my class definition.
#ifndef __GL_COMPONENT
#define __GL_COMPONENT

#define PI 3.14159
#define TWO_PI PI*2.0
#define HALF_PI PI/2.0

#include <windows.h>
#include <cstdlib>
#include <gl/gl.h>
#include <gl/glu.h>
#include <math.h>
#include <vector>

#include "Player.h"

class CGame
	int m_windowWidth;
	int m_windowHeight;

	float m_angle;

	vector<CPlayers> m_Players;

	virtual ~CGame();

	bool Init();
	bool Shutdown();

	void SetupProjection(int width, int height);

	void Prepare(float dt);
	void GameLoop();

	void ResetRoom();

Anyone see the problem?

Share this post

Link to post
Share on other sites
On another note, you should start getting into the habit of putting brackets around your macros. You could really end up with a really annoying compiler error later down the track.

#define TWO_PI (PI * 2.0)

Or better yet, start using constants..

const double TWO_PI = PI * 2.0;

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this