While working tonight on a project, I struggled for a while with a linker error that complained about a "duplicate symbol".
I eventually figured out that I had a helper function defined instead of just declared in my header file and this was the source of the problem (lost over an hour chasing this).
why can I define inline functions in my header like this;
int get_val const {return r;}
but the same definition outside the class throws a linker error?