Inline Functions | Introduction to Programming with C++ | Part 41

75 Просмотры
If a function is inline, the compiler places a copy of the specified function’s code at each point where the function is called at compile time.
To reduce the overhead of control transfer we tend to use inline functions.
Without inline functions the compiler will have to move back and forth, thus creating more control transfers. The lesser the control transfers, the faster the speed of the compilation.

Inline return-type function-name(parameters){

Язык программирования C++
Комментариев нет.