diff options
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 30 |
1 files changed, 30 insertions, 0 deletions
@@ -0,0 +1,30 @@ +#include <stdlib.h> +#include <stdio.h> +#include "includes/point.h" +#include "includes/rect.h" + +int main(int argc, char** argv) { + Point point = Point_alloc(); + Point_init(point, 0, 0); + Rect rect = Rect_alloc(); + Rect_init(rect, 4, 5, 120, 90); + + char buffer [64]; + + Rect_toString(rect, buffer); + printf("Rect: %s\n", buffer); + printf(" right = %i, bottom = %i\n", Rect_right_get(rect), Rect_bottom_get(rect)); + + Point_toString(point, buffer); + printf("Point (1): %s\n", buffer); + + Point_init(point, 25, -3.5f); + + Point_toString(point, buffer); + printf("Point (2): %s\n", buffer); + + free(point); + free(rect); + + return 0; +} |