#includeint main() { BRect windowRect(100, 100, 500, 500); // Left, top, right, bottom BWindow* window = new BWindow(windowRect, "My Window", B_TITLED_WINDOW, B_QUIT_ON_WINDOW_CLOSE); window->Show(); return 0; }
#includeIn this example, we create a new BRect object with a width and height of 100, and then use the LeftBottom method to retrieve its bottom-left coordinates as a BPoint object. We then print the BPoint object to the console using std::cout. Overall, BRect is an integral class in the BeOS/Haiku Application Kit library for creating and manipulating 2D rectangular regions and bounds.#include int main() { BRect rect(0, 0, 100, 100); std::cout << "Bottom left coordinates: " << rect.LeftBottom() << std::endl; return 0; }