I have the signature of the function in my .hpp file and the definition in my .cpp file.
I get a linker error every time I try this, but it goes away and works just fine as soon as I remove the word 'inline'.
I have the signature of the function in my .hpp file and the definition in my .cpp file.
I get a linker error every time I try this, but it goes away and works just fine as soon as I remove the word 'inline'.
An inline function must be defined in every translation unit in which it is odr-used. If you want the function to be inline, you need to define it in the header. If you want to declare it in the header and define it in the .cpp
file, then don't mark it inline
.