4 ms·
>*(c ? &x : &y) = v; Do you know why need to use pointer magic here? Tried (c ? x : y) = v; and wondering why that doesn't work.
by bear8642 6y ago
>*(c ? &x : &y) = v;
Do you know why need to use pointer magic here?
Tried
(c ? x : y) = v;
and wondering why that doesn't work.
- gallier2 6y agobecause ternary operation is a Rvalue only in C. In C++ and as gcc extension it can be used as Lvalue, but not in regular plain C.