The inline keyword tells the compiler to substitute the code within the function definition for every instance of a function call. However, substitution occurs only at the compiler’s discretion. For example, the compiler does not inline a function if its address is taken or if it is too large to inline.
Syntax of inline function,
inline return-type function-name(parameters)
{
// function code
}
Answer:
The inline keyword tells the compiler to substitute the code within the function definition for every instance of a function call. However, substitution occurs only at the compiler’s discretion. For example, the compiler does not inline a function if its address is taken or if it is too large to inline.
Syntax of inline function,
need an explanation for this answer? contact us directly to get an explanation for this answer