Categories

Jul 16, 2019 in C++

Q: What is Inline Functions?

1 Answer

Jul 16, 2019

C++ provides an inline functions to reduce the function call overhead. Inline function is a function that is expanded in line when it is called. When the inline function is called whole code of the inline function gets inserted or substituted at the point of inline function call. This substitution is performed by the C++ compiler at compile time. Inline function may increase efficiency if it is small.

The syntax for defining the function inline is:

inline return-type function-name(parameters)

{

// function code

}

Remember, inlining is only a request to the compiler, not a command. Compiler can ignore the request for inlining.

Click here to read more about C++
Click here to read more about Insurance

Related questions

Madanswer
Jul 16, 2019 in C++
Jul 16, 2019 in C++
Jul 16, 2019 in C++
...