Hello World Main in C++

Example main.cpp file

// Your First C++ Program

#include <iostream>

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

Compile it with g++

g++ main.cpp -o out_runnable

Run it:

./out_runnable

Example Commit:

gt.sandbox.checkout.commit.cleanly df75277 \
&& cd cpp/hello-world \
&& file.execute.announce ./build.sh \
&& file.execute.announce ./run.sh


Children
  1. Compiled with g++ directly