Inline Definitions and Declarations?
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
Code:
class Someclass
{
public:
inline void vSomeFunc();
};
...and in my .cpp file I have:
SomeCppFile.cpp
Code:
inline void SomeClass::vSomeFunc()
{
std::cout << "Some output" << std::endl;
}
... so in my source file, do I need to define the function vSomeFunc as inline if I have already declared it as inline?