Hello everyone. I have tried my best to remedy this error that I am having. I've been working on a game engine and have written 200 files, but for some reason this one is giving me trouble. I'm sure its something arbitrary that I'm not seeing. I'm getting these errors in VS 2008:
error C2146: syntax error : missing ';' before identifier 'rect'
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
The Rectangle file is:
Code:
#ifndef RECTANGLE_H
#define RECTANGLE_H
#include "MathHeader.h"
#include "Vector3.h"
class Rectangle
{
public:
Rectangle(void);
Rectangle(const Vector3& center, const Vector3* axes, const real* halfWidths);
~Rectangle(void);
Vector3 closestPointToRect(const Vector3& point);
Vector3 center;
Vector3 axes[2];
real halfWidths[2];
};
#endif
and the header file that uses the rectangle is:
Code:
#ifndef CONSOLE_H
#define CONSOLE_H
#include "WindowsGLIncludes.h"
#include "AbstractGameObject.h"
#include "MathHeader.h"
#include "Rectangle.h"
#include "Vector3.h"
#include "HardwareBufferManager.h"
class Console : public AbstractGameObject
{
public:
Console(void);
Console(const int& width, const int& height, const Vector3& center);
virtual ~Console(void);
void update();
void animate(real elapsedSeconds);
void render();
Rectangle rect;
};
#endif
I don't know why its having trouble understanding the rectangle type. If anyone can give me assistance I would be very grateful.