.I have a big array of coordinates that looks like this
triangle_t teapot_model[] = {
{
.x1=5,
.y1=10,
},
{
.x1=20,
.y1=30,
},
(keeps going)
How can I print all of the items in this array without knowing their position? I want this output:
Output:
.x1=5 y1=10
.x1=20 .y1=30
sizeof(teapot_model)/sizeof(teapot_model[0])will tell you the exact number of elements (or you can count them manually).