C++ examples for Operator:Conditional Operator
Using the Conditional Operator to Make Comparisons
#include <iostream> #include <string> using namespace std; int main() /*from w w w.j a va 2 s. c o m*/ { string name; cout << "Type your name: "; cin >> name; cout << "Your name is " << name << endl; return 0; }