Hey programmers of C Board
I have a question about inline functions. If I declare a function inline, do I have to define it as inline also? I'll demonstrate:
SomeHeader.h
...and in my .cpp file I have:Code:class Someclass { public: inline void vSomeFunc(); };
SomeCppFile.cpp
... so in my source file, do I need to define the function vSomeFunc as inline if I have already declared it as inline?Code:inline void SomeClass::vSomeFunc() { std::cout << "Some output" << std::endl; }