What are inline functions?

Questions by suji   answers by suji

Showing Answers 1 - 4 of 4 Answers

amit mahajan

  • Oct 5th, 2005
 

inline functions are the functions with the keyword inline written prior to their declaration in a class.it has the advantage that if a function is made inline than the code of the called function is placed at the site where it is called.so it obviates the need of jumping to different addresses acc to how many times it is being called.it is useful in small functions but for bigger functions normal functions work better.

  Was this answer useful?  Yes

By adding key word inline before the function name in the declaration, allows the function to be defined in the same file, in most case the header or the .h file without doing so in .cpp file.

Eg:-

inline LONG GetSeedValue(CEndUserRec* record)
{
    return record->ENDUSERSID;
}

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions