Ok.... I have another problem with a different program.... I want to work on building a Kaleidoscope but I need to get used of creating Rectangles and such but whenever I compile this program this error comes up:
Code:
fatal error C1010: unexpected end of file while looking for precompiled header directive
Error executing cl.exe.
here is the source code that I'm trying to compile:
Code:
#include "rect.h"
RectangleShape::RectangleShape(SimpleWindow &w,
float x, float y, color c,
float l, float h) : Window(w),
XCenter(x), YCenter(y), Color(c),
Length(l), Height(h) {
}
void RectangleShape::Draw() {
const Position Center = Position(XCenter, YCenter);
Position UpperLeft = Center
+ Position(-(.5 * Length), -(.5 * Height));
Position LowerRight = Center
+ Position(.5 * Length, .5 * Height);
Window.RenderRectangle(UpperLeft, LowerRight,
Color, true);
}
color RectangleShape::GetColor() const {
return Color;
}
void RectangleShape::GetSize(float &l,
float &h) const {
l = Length;
h = Height;
}
void RectangleShape::GetPosition(float &x,
float &y) const {
x = XCenter;
y = YCenter;
}
SimpleWindow& RectangleShape::GetWindow() const {
return Window;
}
void RectangleShape::SetColor(const color c) {
Color = c;
}
void RectangleShape::SetPosition(float X, float Y) {
XCenter = X;
YCenter = Y;
}
void RectangleShape::SetSize(float L, float H) {
Length = L;
Height = H;
}
thanks for all the help.