Is is possible to have this line of code ?
loops_per_msec = (1000000 * loops_per_msec / run_time ? :
loops_per_msec);
My compiler gives me error although this line of code is exactly copied and pasted from other usable source file.
The ternary conditional operator ?: takes three operands.
But GCC accepts, as an extension, to omit the middle operand.
In your case, coding
loops_per_msec = (1000000 * loops_per_msec / run_time ? run_time :
loops_per_msec);
would make any compiler happy.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With