Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

short hand if else in c++

int time = 20;
string result = (time < 18) ? "Good day." : "Good evening.";
cout << result; 
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #short #hand
ADD COMMENT
Topic
Name
5+5 =