Back to course

Your First Program: Hello World

C++ Masterclass: From Zero to Hero

The Code

cpp #include

int main() { std::cout << "Hello World!"; return 0; }

Explanation

  • #include <iostream>: Includes the library for input and output.
  • int main(): The starting point of every C++ program.
  • std::cout: Standard Output stream.
  • return 0: Indicates successful execution.