Introduction
In C, one of the ways to preserve efficiency is through the use of macros, which allows you to make what looks like a function without the normal function call's overhead. Macros are replaced with macro codes by preprocessor.
There are some problems here, with using macro: First, No type checking is done when replacing macros. Second, macros cannot access private class members. So... what happens to the efficiency I said ? This was solved by bringing in the concept of inline functions...

Syntax
Making a C++ function inline is so easy, the function definition is the same as normal functions, just add the inline keyword before the return type. This simple function is defined as inline:

inline void func() {
cout<<"inline function"<<endl;
}

Now, we are going to explain how to implement inline functions inside classes... Look at this very simple class:

In this class, there are two very basic member functions named ret and set, the first one returns the value of the internal variable and the second one assigns the internal value a given argument. Such little/simple functions should be defined as inline to avoid having function call overhead for them... which helps improve the speed and efficiency of our class.

How do we define member functions as inline? the answer is: Just define them right inside the class body; all functions defined inside class' body are treated as inline functions... how ever you Can add the inline keyword to the function definition also, but why not make it shorter?
Look at the updated class:

Just note that, The inline code Does occupy space, but if the function is small, this can actually take less space than the code generated to do an ordinary function call.
OK, now speak about the problems and limitations...

A Compiler can only make a function inline if the definition of the function exits within the same translation unit as the call, which means inside the same source/header file it was defined, plus header files included inside this file.
Also note that, by putting the inline keyword (or by other ways mentioned), there is no guarantee that they will be made inline, as it is Only a Suggestion to the compiler... after this suggestion, the compiler decides whether or not it can go inline. Always note that, very simple functions that have no loops(looping is counted as a complicated operation for replacement) should be defined as inline to give you efficiency. But as mentioned, it is a suggestion and the compiler is the final decider. *did you notice I said that note two times in a row? because it was important *

Hope this tutorial helped you understand usage of inline and benefits it can give you
Special Thanks to NickDMax for mentioning the problems and weak points of this article.

Thanks for the excellent tutorial mate, I will definitely find this feature very useful for the small programs I write to solve maths problems. I regularly isolate small operations inside functions for the sake of clarity e.g.

Could someone explain why it would be bad to try and make every function inline? I mean the compiler decides which is better anyway right?
also, how could you make inline functions and still have them implemented in separate files