course of C++ programming language

lecture 1: making and using objects


The first program

In all its glory, the following code is the simplest C++ program you're likely to encounter.

// helloworld.cpp #include int main (int argc, char *argv[]) { std::cout << "Hello, World!" << std::endl; return 0; }

This code, as you might expect, prints the message Hello, World! on the screen. It is a simple program and unlikely to win any awards, but it does exhibit several important concepts about the format of a C++ program.


References
  1. B.Eckel: Thinking in C++. Second edition.
    Section 2: making and using objects; subsection: your first C++ program; pp. 90-95.