What is ? 0 : 1 in C++?
By
BuckGup
in Programming
in Programming
Go to solution
Solved by Kuroneko_,
That is known as a ternary operator.
You need to specify a boolean before ?, the compiler will check the value and depending on whether the value is true or false, it will evaluate to either the first or second argument respectively.
-
Featured Topics
-
Topics
-
1
-
TristenM ·
Posted in New Builds and Planning0 -
torlock ·
Posted in Troubleshooting0 -
1
-
Captain LeFwee ·
Posted in Troubleshooting0 -
Hyperpower_BHAM ·
Posted in New Builds and Planning14 -
XxWOODSIExX ·
Posted in Troubleshooting1 -
0
-
Delano.888 ·
Posted in CPUs, Motherboards, and Memory12 -
1
-
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now