the question write function returns bounding rectangle set of points in 2 dimensional plane. size two. know points come in format {double, double} , know how create bounding rectangle. can't seem grab points though. tried iterating this.
rectangle2d getrectangle(const double points[][size], int s) { (int = 0; < s; i++) { (int j = 0; j < size; j++) { cout << points[s][size] << endl; } } // put these points in after figure out iteration. rectangle2d rekt(x, y, width, height); return rekt; }
you accessing same element element every time, because s , size remain constant. have access points[i][j]
. , i'm not sure, think can't pass size within array argument, should pass additional parameter. luck ;)
Comments
Post a Comment