More on Functions
You have learnt the basis of functions. Now, come to get further knowledge. It is better to get through the Inline functions, though they are not much significant. The main thing is to use as less time as we can. These functions work similar to placeholder. If you have described the inline function, then just by calling the function you can get the coding of it.
But the point is that by giving function call, more time will be consumed. On the other hand, codes do not get more time in execution. Now, our easiness is in writing the function once in the start. We can recall it anywhere we want. If there is any mistake then we have to make correction for one time. On the other hand, codes will have to be modified on all places. For instance, if you have a code in the program for 70 times then any fault in it will be recovered 70 times. It will take your time and will make your program lengthier.
The format of inline function is not difficult. You have to write it in front of a function.
using namespace std;
inline void hi()
When the program will be checked then the inline function will be restored by using the code.
Be Aware: It is fine to use Inline functions. They save our precious time. But the draw back is that if these functions are used frequently then the program will become too lengthy. As lengthy programs lose their efficiency and can not work properly. They take more time in execution. So, try to use them for mini functions. They will give you good result.
Now, you have understood what Inline functions are? If you have some difficulty then you can directly ask from us.