#includeint main() { sf::IntRect rect(10, 20, 30, 40); int bottom = rect.bottom; // get the y-coordinate of the bottom edge of the rectangle return 0; }
#includeIn this example, we create an IntRect object just like in Example 1. However, instead of accessing its "bottom" member, we set it to 100. Overall, the IntRect class and its "bottom" member are useful for representing and manipulating rectangles with integer coordinates.int main() { sf::IntRect rect(10, 20, 30, 40); rect.bottom = 100; // set the y-coordinate of the bottom edge to 100 return 0; }