We all agree that arrays are a simple and powerful way to encapsulate data, especially if you care about accessing a single element and be able to traverse the array via loops.
And this kind of data structure makes a lot of sense when the actual position of an element in the array carries no particular meaning, but this is often not the case.
Imagine you are writing code that deals with points in a 3D space, it could be a game engine, protein folding, a particle simulation, whatever. How would you go and define your point
?
Well... you have basically two options, right? You could either use a struct/class
struct point{