Write a function named sum_rectangles that will open a binary file named " " for reading and read the binary images of rectangle structures from it. For each rectangle structure, add it's elements to those of the first structure read. e.g. sum the height fields of all the structures, sum the width fields of all the structures, etc... Return a structure from sum_rectangles where each element represents the sum of all structures read from the file. i.e. the height field should be the sum of all of the height fields of each of the structures. On any file error, return the structure { -1.0, -1.0, -1.0 }.

Q&A Education