So here's an example. The star's mLocation and mSpeed are a Vector3 custom type.
I'v tried:
Star &star = *iStar;
Star star = *iStar;
Using iStar-> directly doesn't work with my operators, not sure why.
So whats the proper way to do that?
void UniverseManager::ApplySpeedVector()
{
std::list <Star>::const_iterator iStar;
for (iStar = mStars.begin(); iStar != mStars.end(); ++iStar)
{
// how to I get a hold on the object the iterator is pointing to so I can modify its values
// i tried Star &star = *iStar; this is illegal
// tried just using the iStar->mLocation += iStar->mSpeed this also fails due to the operator not accepting the values not sure why
// tried other things as well, so what is the proper way to do this?
iStar->SetLocationData( iStar->mLocation += iStar->mSpeed);
}
}