I have a simple program, which I copied exactly from the example in http://www.learncpp.com/cpp-tutorial/19-header-files/ because I\'m learning how to make c++ programs with
The code is almost perfect.
Add a line #include "add.h" inadd.cpp`.
#include "add.h" in
Compile the files together as g++ main.cpp add.cpp and it will produce an executablea.out
g++ main.cpp add.cpp
a.out
You can run the executable as ./a.out and it will produce the output "The sum of 3 and 4 is 7" (without the quotes)
./a.out