Jumat, 31 Maret 2017

What are inline member functions in C++

Making a function inline avoids the overhead of a function call. By default functions defined inside a class are inline. To get the benefits of making a function inline, functions defined outside the class can also be made inline. Syntax for defining a function as inline is as follows: 1 2 3 4 inline return–type ClassName :: function–name(params–list) { //Body of function } Consider the following example which demonstrates inline member functions: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28

The post What are inline member functions in C++ appeared first on Coding Security.


What are inline member functions in C++
read more

Tidak ada komentar:

Posting Komentar