-fpermissive Error
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> #include <stdbool.h> struct Geometry { bool isrectangle, isquare, isline, iscircle; float x1, x2, y1, y2; float square_corner1, square_corner2, side; float center1, center2, radius; float rectangle_corner1, rectangle_corner2, width, height; }; void initRectangle(struct Geometry **object) { scanf("%f %f %f %f", &((*object)->rectangle_corner1), &((*object)->rectangle_corner2), &((*object)->width), &((*object)->height)); (*object)->isrectangle = true; (*object)->iscircle = false; (*object)->isquare = false; (*object)->isline = false; }; void initSquare(struct Geometry **object) { scanf("%f %f %f", &((*object)->square_corner1), &((*object)->square_corner2), &((*object)->side)); (*object)->isrectangle = false; (*object)->iscircle = false; (*object)->isquare = true; (*object)->isline = false; }; void initCircle(struct Geometry **object) { scanf("%f %f %f", &((*object)->center1), &((*object)->center2), &((*object)->radius)); (*object)->isrectangle = false; (*object)->iscircle = true; (*object)->isquare = false; (*object)->isline = false; }; void initLine(struct Geometry **object) { scanf("%f %f %f %f", &((*object)->x1), &((*object)->x2), &((*object)->y1), &((*object)->y2)); (*object)->isrectangle = false; (*object)->iscircle = false; (*object)->isquare = false; (*object)->isline = true; }; void printGeometry(struct Geometry* object) { if (object->iscircle == true){ printf("Circle with center at %f, %f and radius %f\n", object->center1, object->center2, object->radius); } else if (object->isline == true){ printf("Line from (%f, %f) to (%f, %f)\n", object->x1, object->x2, object->y1, object->y2); } else if (object->isquare == true){ printf("Square with corner at (%f, %f) and side %f\n", object->square_corner1, object->square_corner2, object->side); }