Good evening
The exercise asks me to implement three structs: Point (X and Y coordinates), polygonal lines (sequence of 2 to 100 points that are the vertices along the line) and polygon (sequence of 3 to 100 points that are the vertices along the polygon where the latter coincides with the first).
I have implemented the struct for the points as follows:
typedef struct //Estrutura definida para os pontos.
{
double x;
double y;
} Ponto;
For the polygonal lines I defined as follows, but I do not know if it is the correct one and if it is the best form.
typedef struct //Estrutura definida para as linhas poligonais.
{
Ponto Vertice;
} Linha;
Now for the polygons I did not have an idea how to do it. But I know the difference between a polygon line and a polygon is that for the polygon, the last and first coordinates are the same (how do I specify this already inside the struct?). I would like an idea of how to proceed.