Quote:
The function1.cpp file is a function that is included as header file because it is written as a separate program outside main program.
There is no such thing like a "separate program" when building C/C++ applications (besides starting other executables).
You have to compile the
function1.cpp file too and link the created object file with the others from your application. With Visual Studio, just add the file to your project (Project - Add existing).
Note also that source files (
*.cpp) should not be included. It is bad practice and may lead to additional problems.