I understand that this error is C++-related, however, I think I get the answer sooner here.
I wrote a function which writes the positions of an array of rigid bodies (array of rigid bodies were generated by btAlignedObjectArray<btRigidBody*>):
Code: Select all
void beadPositionWriter(btRigidBody* rigidBody[], int NumberOfRigidBodies, int index){
std::ofstream beadsPositions("beadsPositions/beadsPositions." + std::to_string(index) + ".csv");
beadsPositions << "xCoord" << "," << "yCoord" << "," << "zCoord" << std::endl;
for (int j =0; j < NumberOfRigidBodies; j++){
beadsPositions << rigidBody[j]->getWorldTransform().getOrigin().getX() <<"," << rigidBody[j]->getWorldTransform().getOrigin().getY() << "," << rigidBody[j]->getWorldTransform().getOrigin().getZ() << std::endl;
}
beadsPositions.close();
}
Code: Select all
beadPositionWriter(metalBeadRB*, exactNumBead, time1);
Does anyone know what is missing?Expected primary-expression before ‘,’ token
Thanks