Are you asking for the specifics of the floating point ALU? That's getting pretty deep, man. I'd be curious to see it if anyone has access to that info.
Maybe: My interest lies on to know the hardware-algorithmics aspects behind the add and mul operations, regardless if those operations are performed in the FPU or not.
#include <vector>
#include <list>
#include <iostream>
int main()
{
std::list<std::vector<int>> listVectors{{1,2,3},{4,5,6},{7,8,9}};
for ( auto& vec : listVectors )
for ( int& i : vec )
//process each int i
std::cout << i << std::endl;
}
You're using *automatic* (EDITED, thanks @rip-off. Don't confuse with "auto" C++11 reserved word) declaration -> allocation on the variable "myBullet". That means (among other things) that the "myBullet" timelife remains in the scope in which that variable was declared, in this case, the precedent if statement. When the if statement is consumed, all the *automatic* resources inside the "if" scope are destroyed, including "myBullet". That is the reason why "myBullet.update()" is undefined, because there's no declaration of "myBullet" in the present scope or an outter scope (When you comment out the first line, myBullet declaration, this is in a outter scope, and therefore works). What you need to do is using dynamic allocation, something like the solutions presented by the others members.