Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Borland C++ 2.x ( with Turbo C ) - <b>inline inline function modifier</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 inline                  Inline Function Modifier

 inline datatype [classname::]functionname (parameters) {statements;}

            The inline modifier in front of a function definition
    declares it to be a C++ inline function. An inline function is
    expanded in line when it is used instead of being called, much like a
    macro. Declaring an inline function saves the overhead of calling and
    returning from a function, but since it is fully expanded in line,
    you should reserve this option for small functions.

      Notes:    If you both declare and define a member function
                within its class, that function is called an inline
                function and you do not have to use the inline modifier.

   -------------------------------- Example ---------------------------------

         inline int my_class::my_func(void) {return my_data;}




Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson