logical operators in c++ code example
Example 1: how to write an or in c++
if (a == 0 || b == 0)
{
//statement here, || was used as an or
}
Example 2: c++ .* operator
The .* operator is used to dereference pointers to class members.
Example 3: operand-- c++
++x;
x+=1;
x=x+1;
Example 4: opperanf >> c++
packet >> rec1.getPosition().x >> rec1.getPosition().y;