Thread: compiling error
View Single Post
Old Oct 27th, 2006, 6:35 PM   #21
The Dark
Expert Programmer
 
Join Date: Jun 2005
Posts: 824
Rep Power: 4 The Dark is on a distinguished road
Some of your rectangles are outside of the bounds of screen, which cause the program to write outside the bounds of the array. Note that the rectangle takes its parameters as hieght then width, which is the opposite order to the x,y that point takes.

The values you are passing in for Paint are not printable - char value 1 2 3 and 4 are control characters and will display oddly on your screen. Try using '1', '2', etc.

Inside the loop in the rectangle draw function the point to set is in i and j, not x1 and y1 (my example code is wrong too).
The Dark is offline   Reply With Quote