Answer Posted / utpal kumar kashyap
Hi to Everyone,
See, inline function is a function whose code get inserted instead of jump to the function where it was called.
We can make any function as inline but there are few conditions in which compiler will not treat it as inline function....
If
1. Function contains any static variable.
2. It recursive.
3. Function code is large.
However, if function body is large and in this case if we try to make it as inline, then compiler wont give an error, but compiler would treat it as normal function. So idea is this, function code should be small for making it inline.
| Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
What are maps in c++?
What is c++ redistributable?
What is cin clear () in c++?
Will c++ be replaced?
What are c++ files?
what is Loop function? What are different types of Loops?
Why null pointer is used?
What is private, public and protected inheritance?
Why do we use classes in c++?
what is a class? Explain with an example.
What is the v-ptr?
Can we delete this pointer in c++?
How do you invoke a base member function from a derived class in which you have not overridden that function?
What is the importance of mutable keyword?
Which c++ operator cannot overload?