In C++, the ternary conditional operator takes an assignment-expression as it's third operand, so your expression is understood as:
(a >= 5 ? b = 100 : b) = 200;
In the "true" case this amounts to:
b = 100 = 200;
This in turn groups right-to-left, i.e.:
b = (100 = 200);
This clearly doesn't make sense.
What you meant to say is:
if (a >= 5) { b = 100; } else { b = 200; }
You don't need an expression; a statement is perfectly fine. Alternatively, as Michelle suggests:
int b = a >= 5 ? 100 : 200;
Note that the ternary conditional operator is different in C, although it looks similar!