Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

conditional operator in c++

 // syntax
condition ? inline code for ture condition : inline code for false condition;

3 > 2 ? true : false; // return true
 
PREVIOUS NEXT
Tagged: #conditional #operator
ADD COMMENT
Topic
Name
5+7 =