C++ functions can be declared inline

Posted On
May 24, 2007 by Ajay
Language:

If they contain just simple lines of code, use no for loops or the like, C++ functions can be declared inline. This means their code will be inserted right everywhere the function is used. That's somehow like a macro. Main advantage is the program will be faster. A little drawback is it will be bigger, because the full code of the function was inserted everywhere it is used: