Any source file that contains usage of an inline function must contain the function's definition.
An inline function must be identically defined everywhere. The easy way to do this is to define it once, preferably in the class header file, and include the definition as needed. The hard way is to carefully redefine the function everywhere and learn the one-definition rule (see FAQ 13.04). But even the easy way has a potential glitch, so read FAQ 13.04 regardless.
main() cannot be inline.
But these are just language rules that tell how to do inline functions. To find out when to do inline functions, read the rest of this chapter.