Inline Function
When we write a function inside the class, it is called inline function.
Merit and Demerit :
The benefit of inline function is, the program run fatly because when we declare an object of that class then function is copied for every object. But for inline function, object need to more memory space.
Other side, when we define function outside of the class, the code of the function is made a copy for the object and one or more object use this copy but here program will be slow for jumping. And here object need not more memory.
Written by “Shojib”
No comments:
Post a Comment