Need help with header file


#1

I am new to coding and I cant seem to get atom to read my add.h file in my main.cpp.
It only works if I use #include"add.cpp" in the main.cpp instead
Here is the code from my 3 files:
Please help!

//add.h
int add(int x, int y);

//add.cpp
#include “add.h”
int add(int x, int y)
{
return x + y ;
}

//main.cpp
#include
#include “add.cpp”
int main()
{
std::cout << "The sum of 3 and 4 is " << add(3,4) << “\n”;
return 0;
}