[Google translation: The so-called three head operator should certainly have three operands, my question is why the above code "?" Is not followed by the operands can be successfully compiled arduino, just want to ask a question, may be relatively simple, do not like do not spray !
sketch_may11a.ino:11:19: warning: ISO C++ does not allow ?: with omitted middle operand [-Wpedantic]
sketch_may11a.ino:11:21: warning: ISO C++ forbids omitting the middle term of a ?: expression [-Wpedantic]
Which is a clear indication of a GCC extension. On searching the warning in Google I found an article, and indeed its specific to the GNU compiler:
You may be able to find info on google whether visual studio has support for this feature.