There should be a section in the tutorial on this website about operator overload.
Anyway you have seen the basics so just change the operator provided by kbw to:
inline is probably right for this kind of trivial function, but normally you wouldn't put your function definitions in the header. You would put them in a separate file.
disagree. the header is the right place for the inline function. you can't put it in a .cpp
file and expect the function to be inlined in any translation unit other than that .cpp file
then.