main() { Screen picture; Rect myrect; ifstream infile; int a, b, c, d; char filename[50]; init_screen(picture); cout << "Enter filename> "; cin.getline(filename, 50); infile.open(filename); if (infile.fail()) { cout << "could not open file..."; exit(0); } infile >> a; while (!infile.eof()) { infile >> b >> c >> d; make_rectangle(a, b, c, d, myrect); insert_rectangle(picture, myrect); infile >> a; } clrscr(); draw_screen(picture); cout << "Area is = " << compute_area(picture); return(0); }