C++ examples for Language Basics:Hello World
First Program in C++: Printing a Line of Text
#include <iostream> int main() {/*from w w w.ja v a2s . com*/ std::cout << "Welcome to C++!\n"; // display message return 0; // indicate that program ended successfully }