I cannot figure out why this is not working. I will put up all three of my files and possibly someone can tell me why it is throwing this error. I am using g++ to compile the
The declaration and definition of insertLike
are different
In your header file:
void insertLike(const char sentence[], const int lengthTo, const int length,
const char writeTo[]);
In your 'function file':
void insertLike(const char sentence[], const int lengthTo, const int length,
char writeTo[]);
C++ allows function overloading, where you can have multiple functions/methods with the same name, as long as they have different arguments. The argument types are part of the function's signature.
In this case, insertLike
which takes const char*
as its fourth parameter and insertLike
which takes char *
as its fourth parameter are different functions.