0 votes
asked in C++ by
hI all

  Benefits of inline functions in c++??

1 Answer

0 votes
answered by

In hard real time systems, the most important factor is execution time of codes. So when you call functions especially in loops you loss a time for calling a function and return from it. To avoid this lose of time (no need for function call mechanism) put inline keyword in front of a function declaration as shown below: 

inline double cube( double x) 
    return x*x*x;