Hi so I'm new to C++ and I wanted to try calling a function called "bark" in my main function defined in another .cpp file. I created a header file to prototype the bark function, but when I try to call the bark function in main i have 1 error saying "Undefined reference to bark() I have no idea what I'm doing wrong and I would like to learn how to fix this error.
Undefined reference means the compiler can't find the definition of the function. Make sure that you are compiling and linking both main.cpp and Dog.cpp (if you use an IDE you should have all files in the same project).