can't find <rect.h>

This is a discussion on can't find <rect.h> within the C++ Programming forums, part of the General Programming Boards category; I am trying to learn how to use EZWindows. It's hard because my copy of Visual Studio.Net gives me an ...

  1. #1
    MB1
    MB1 is offline
    Registered User
    Join Date
    Feb 2005
    Posts
    38

    can't find <rect.h>

    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;
    }

  2. #2
    Registered User
    Join Date
    Sep 2004
    Posts
    719
    i suggest turning a page of 2 forward in your book
    i seem to have GCC 3.3.4
    But how do i start it?
    I dont have a menu for it or anything.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem building Quake source
    By Silvercord in forum Game Programming
    Replies: 16
    Last Post: 07-11-2010, 09:13 AM
  2. could not find -lwsock32.lib
    By thomas_joyee in forum C++ Programming
    Replies: 8
    Last Post: 07-14-2008, 12:28 PM
  3. How to find O of threads ?
    By jabka in forum C Programming
    Replies: 3
    Last Post: 03-11-2008, 12:25 PM
  4. how do u find 2nd largest number??
    By juancardenas in forum C Programming
    Replies: 8
    Last Post: 02-14-2003, 07:28 AM
  5. Q: Recursion to find all paths of a maze
    By reti in forum C Programming
    Replies: 7
    Last Post: 11-26-2002, 08:28 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21