Total Posts
- Total Posts
- 2,126
- Posts Per Day
- 1.57
- Last Post
- Few C questions 05-03-2010 03:40 PM
Visitor Messages
- Total Messages
- 7
- Most Recent Message
- 11-19-2008 05:54 PM
General Information
- Last Activity
- 07-19-2010 02:40 PM
- Join Date
- 05-28-2008
- Referrals
- 1
1 Friend
Showing Friends 1 to 1 of 1
View MeTh0Dz's Blog
by
MeTh0Dz on 06-22-2008 at 09:00 PM
A ternary operator is an operator that requires three different parameters/arguments. It is basically used to evaluate an if statement.
Example...
(x == 10) ? (cout << "X equals 10") : (cout << "X does not equal 10");
Basically this says, if x equals ten then print the first message, else print the second message. So it is actually the same as this...
if (x == 10) {
Read More