I made some modifications to my code. I had noticed the naming conventions W and Window when comparing it to a sample program written. I also included in the original Square class the declarations so I could refer to them in my code. I dont want anyone to do the work for me I just want to be pointed in the rigfht direction as to what I might be doing wrong! Thanks for the first reply!
Code:
#include <iostream>
using namespace std;
#include "I:\GreenSquare\EzWin\ezwin.h"
class Square {
public:
Square(SimpleWindow &W, const color, float XCenter, float YCenter, float SideLength);
void Draw();
void SetColor(const color &Color);
void SetPosition(float XCoord, float YCoord);
void SetSize(float Length);
private:
color Color;
float XCenter;
float YCenter;
float SideLength;
SimpleWindow &Window;
};
SimpleWindow W("Sample", 8.0, 8.0);
int ApiMain() {
W.Open();
Square GreenSquare(W, Green, 3.5, 2.5, 1.5);
GreenSquare.Draw();
return 0;
};
now I am getting the following errors
Code:
GreenSquare.obj : error LNK2001: unresolved external symbol "public: void __thiscall Square::Draw(void)" (?Draw@Square@@QAEXXZ)
GreenSquare.obj : error LNK2001: unresolved external symbol "public: __thiscall Square::Square(class SimpleWindow &,enum color,float,float,float)" (??0Square@@QAE@AAVSimpleWindow@@W4color@@MMM@Z)
Debug/GreenSquare.exe : fatal error LNK1120: 2 unresolved externals