D
desktop
I have a main.cpp file that will call a single function. For the sake of
curiousity I would like to place this function in a separate file called
func.cpp and include it in my main.cpp with: #include "func.cpp". But it
gives a multiple definitions error.
Do I always have to make a .h file for a .cpp file if I want to include
the functionality in another module?
curiousity I would like to place this function in a separate file called
func.cpp and include it in my main.cpp with: #include "func.cpp". But it
gives a multiple definitions error.
Do I always have to make a .h file for a .cpp file if I want to include
the functionality in another module?