Possible Duplicate:
Why are C++ inline functions in the header
Is it any difference between write inline method realization in header or cpp-file?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
inlinemakes sense in the header, along with the function definition. If it’s in an implementation file, multiple definition isn’t an issue, and the compiler will have a hard time inlining it anyway outside that translation unit (and inside that translation unit, it probably won’t matter anyway – it’s just a hint).