C++ Hello World is the simplest program that any beginner learning C++ should try.
-
clone this repository
git clone https://github.com/mfrank37/cxx-hello-world.git
-
Make sure you have installed a compiler of your choice. Mine is GNU GCC
-
Now after installing a compiler call it from your
terminal
g++ --version
-
Great! If you can see the version of the compiler you are ready to run. If not try setting the environment variables your compiler's
bin
directory into system's path environment variables. -
Open your terminal from the project's root folder then run
g++ hello.cpp -o hello
-
Now you should see an executable file called hello to run your Cool program. On windows it should be
hello.exe
-
Finally you can run on Windows
hello.exe
-
Or you can run on other systems/terminals such as
bash
orpowershell
./hello
-
Congratulations! 👏💥
You have now made your first step in learning and mastering C++.