G'day folks.
This isn't necessarily a Box2D issue, but it involves a Box2D structure so I thought it best to bring it here first.
Basically, I am trying to create a 2 dimensional vector to contain b2Vec2 data.
My research indicates that the following should work:
But when I attempt to compile in Code::Blocks I get the error:
error: expected constructor, destructor, or type conversion before '.' token
In relation to the second line of code.
Any ideas anyone?
Thanks.
This isn't necessarily a Box2D issue, but it involves a Box2D structure so I thought it best to bring it here first.
Basically, I am trying to create a 2 dimensional vector to contain b2Vec2 data.
My research indicates that the following should work:
Code:
std::vector< std::vector<b2Vec2> > timeFrame(1, std::vector<b2Vec2>(1));
timeFrame.at(0).push_back(b2Vec2(0.0f,0.0f));
timeFrame.at(0).push_back(b2Vec2(0.0f,0.0f));
But when I attempt to compile in Code::Blocks I get the error:
error: expected constructor, destructor, or type conversion before '.' token
In relation to the second line of code.
Any ideas anyone?
Thanks.