+ 5

What is inline function

17th May 2018, 10:23 AM
XDivian
XDivian - avatar
2 ответов
+ 11
Inline function is powerful concept that is commonly used with classes. If a function is inline, the compiler places a copy of the code of that function at each point where thefunction is called at compile time. The compiler can ignore the inlinequalifier in case defined function is more than a line. https://www.tutorialspoint.com/cplusplus/cpp_inline_functions.htm
17th May 2018, 10:59 AM
Abhivarshini Maddala
Abhivarshini Maddala - avatar
+ 3
" 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. ..." Source: https://www.geeksforgeeks.org/inline-functions-cpp/
17th May 2018, 10:33 AM
Rahul George
Rahul George - avatar