opperanf >> c++

C++
packet >> rec1.getPosition().x >> rec1.getPosition().y;

Source

Also in C++: