? : :

I'm doing pretty advanced stuff now with memory manipulation, working with the windows API and even a little bit of kernel programming. Yet, somehow, I never learned what this was. I don't see it come often very often and I never use it myself, but I would obviously still like to know what it does if anyone wouldn't mind linking me to an explanation (or just explaining here.)
It's the ternary operator.

To quote the relevant part from http://en.wikipedia.org/wiki/%3F:

?: is used as follows:
condition ? value_if_true : value_if_false

You're either asking about http://en.wikipedia.org/wiki/Ternary_operation (a ? b : c)
or http://en.wikipedia.org/wiki/Scope_resolution_operator (a::b).
There is no ?::
slow :(
Last edited on
Typo Hamster, I was talking about the Ternary Operation. Thanks for the link.

I'll read it now.
Topic archived. No new replies allowed.