I’m using ofxBox2d in this openFrameworks project, working specifically with the joints. I want to eventually access the circle at the end of the joint and rotate it around the mouse in a circle. I know how to do this in a normal array, but I’m more unfamiliar with how it works in this structure. This is the relevant code:

Solved it – for anyone wondering it was because I was saying circles[circles.size()].get(), instead of circles[circles.size()-1]. I was accessing the 31st element of the array – which doesn’t exist – rather than the 30th (since arrays are zero-based).