I am trying to learn how to use EZWindows. It's hard because my copy of Visual Studio.Net gives me an error that "<rect.h> can't be found. Is my copy missing something? Where can I find <rect.h>
Sorry the code is a mess.
Code:
//Simple Window
#include <iostream>
#include <string>
#include <rect.h>
using namespace std;
int ApiMain()
{
const float MowRate = 1.0;
const float PayRate = 6.0;
const int SecondsPerMinute = 60;
const int SecondsPerHour = SecondsPerMinute * 60;
const int DisplayWidth = 20;
const int DisplayHeight = 20;
const float ScaleFactor = 0.01;
cout << "Please use meters for all input\n" << endl;
int LawnLength;
cout << "Please enter the length of the lawn: ";
int LawnWidth;
cout << "Please enter the width of the lawn: ";
int HouseLength;
cout << "Please enter the length of the house: ";
int HouseWidth;
cout << "Please enter the width of the house: ";
cout << endl;
cout << "Yard size: " << LawnLength << " by " << LawnWidth << " meters: << endl;
cout << "House sizee: " << HouseLength << " by " << HouseWidth << " meters" << endl;
int MowableArea = (LawnLength * LawnWidth) - (HouseLength * HouseWidth);
int MowTimeInSeconds = MowableArea / MowRate;
int Hours = MowTimeInSeconds / SecondsPerHour;
int Minutes = (MowTimeInSeconds % SecondsPerHour) /SecondsPerMinute;
cout << "Approximate time to cut: " << Hours << " hour(s) << Minutes << "minute(s) <<
endl;
float DollarCost=MowTimeInSeconds*PayRate / SecondsPerHour;
int Dollars = DollarCost;
int Cents = (DollarCost - Dollars) * 100;
cout << "Cost to cut: " << Dollars << " dollar(s)" << " and " << Cents << " cent(s)"
<< endl;
SimpleWindow Display("Lawn and House Plot", DisplayWidth, DisplayHeight);
Display.Open();
RectangleShape Lawn(Display, DisplayWidth / 2.0, DisplayHeight / 2.0, Green, LawnLength
* ScaleFactor, LawnWidth * ScaleFactor);
LawnDraw();
RectangleShape House(Display, DisplayWidth / 2.0,
DisplayHeight / 2.0, Yellow, HouseLength * ScaleFactor,
HouseWidth * ScaleFactor);
House.Draw();
cout << "Type a character followed by a\n" << "return to remove the display and exit"
<< endl;
char AnyChar;
cin >> AnyChar;
Display.Close();
return 0;
}