Hello, everybody
Am new in programing as i started c++ few months ago , now that am learning the graphics mode (graphics. h) i am finding some difficulty in it. Like when we try to make a rectangle using <graphics.h>
Please note * Am using turbo c++ , yeah i know its too old but this code works.
I am confused with the coordinates used while making rectangle like
Rectangle(50,275,150,400)
What that 50 and 275 means , is that x -axis or y-axis and why are 4 parameters there . Plz explain me like i have no idea what numbers i will write to get that rectangle in center of the screen .
You surely didn't try very hard. I found documentation, about 88,000 different results with a very simple search. A decent set of documentation was available on the first page of these results.
What phrase did you use for your search?
You really should consider changing to a modern compiler and abandon that relic if you really want to learn to program.
PS. I looked at the manual for that compiler. Perhaps you should look for the manual in the library of your school?
Why don't you? You know you're using Turbo-C and you know you want information about the rectangle function. So why don't you combine a couple of the terms in the previous sentence and see what you come up with?
If I recall correctly, the Turbo C Graphics uses an coordinate system that the top left corner is (0, 0), and the bottom right corner to be (getmaxx(), getmaxy()).
The rectangle() function requires 4 parameters, which are (left, top, right, bottom).