I have a header file with all the declarations, one .cpp file that is compiled to a .o file and a .cpp file with the main method.
The strange thing is, the program won't compile (I'm using g++ on cygwin) when a certain function in the .o file is declared inline in the header; only when declared normally.
So, do inline functions have to be declared in the same file that they're used?
inlinefunction has to be visible in every translation unit that uses it. This usually means putting the definition in a header file.