C++ examples for Language Basics:Hello World
Defines the entry point for the console application.
#include <iostream> #include <string> using namespace std; int main(int argc, char *argv []) { cout << "What is your name?" << endl; string name {}; /*from w ww . j av a 2s . c o m*/ cin >> name; cout << "You said your name is: " << name << endl; return 0; }