Phil CK

Hello World in C++

Last updated on

The simplist C++ program …

/* hello.cpp */

#include <iostream>

int
main() {
        std::cout << "Hello World" << std::endl;

        return 0;
};

Outputs …

Hello World

Compile and run with GCC

g++ hello.cpp && ./a.out

or Clang

clang++ hello.cpp && ./a.out