I am trying to implement Header Files with Source Files using C++, but in the terminal the give me some errors.
Here is the code:
using namespace std;
cout << "The Sum of 3 and 4 is: " << add(3,4) << endl;
int add(int x, int y)
return (x + y);
int add(int x, int y);
You did use the C-compiler. The warning tells you that you provide C++-code to the C-compiler. In case you want to get rid of this warning, try clang++ -o add.o add.cpp followed by clang++ -o HeaderTest main.cpp add.o