This is a programming forum, and you have furnished a function header for a function to perform a specific task.
Before you write the program, you must understand the task. If you didn't have access to a computer, how would you solve the problem?
Can you state the problem a little more completely: what do you mean by "redundant"? Do you mean that the rectangles have exactly the same size and shape? Do you mean that the rectangles have the same size and shape and position?
Now, how would you solve the problem on pencil and paper? Maybe you can calculate the coordinates of the four corners of each rectangle and compare. Maybe something else.
Now, try some code (for example compare x1 with y1 and x2 with y2). There are lots of ways to approach the problem. I personally don't think that the first thing is to start writing code.
If you have an approach to the problem and have trouble understanding how to program it in C or C++, or can't understand compiler error messages, or if you run the program and see unexpected results, give us some more information; maybe someone can help.
Good Luck!
Dave
|