C++ Inline Function | Inline Keyword | CPP Video Tutorial

preview_player
Показать описание
In this c++ / cpp programming video tutorials / lecture for beginners video series, you will learn about the inline keyword in c++ programming which is used to define inline functions.

You will learn what inline keyword does, what are inline functions, how to define inline functions, what is the advantage of them, when to use them in detail with example.

Learn Programming in HINDI at our youtube channel

Catch us on SocialMedia
Рекомендации по теме
Комментарии
Автор

I honestly didn't even watch this video, I just want to explain to anyone who's confused or wants to know when you would use inline. ALMOST NEVER. Only consider this if you have a small function that you know will be called many times (I'm talking millions and millions of times, not even thousands). Basically, don't sweat this useless shit! Inlining is virtually pointless and saves a very, very small iota of processing speed at runtime (you basically, WILL not notice the benefits/decrease in your overhead (via pointers/refs etc)). I have no idea why people still teach it, but hey, why not learn everything :P

P.S. I love LearningLad. I learned a lot of what I know from his videos! Stick with it guys! Good luck :)

ken
Автор

name a more iconic duo than indian accent and programming lessons. god bless India

TheBigMeme
Автор

Hello Mr. Anil. Thank you for making such video series and it is really helpful. In this episode, i understood the concept, but however the execution time with inline function is longer than the first time without inline function. One disadvantage of using inline as explained is bigger executable file size, but however the execution time was also longer. kindly clarify my doubt and sorry if i am wrong.

srinikethr
Автор

very taleted sir; teaching every concept clear and fast. Awesome teacher/programmer

ishworbadu
Автор

hello sir nice video!
my doubt is why does the code took more execution time when you used the inline keyword (it took 0.1ms and 0.09ms when inline was not used)

shubhamsingh-ndwo
Автор

the execution time of the program without using inline function is 0.09 sec and with using inline function is 0.11 sec.but acc to your explanation it should be less.could u pls explain why?

preethidonthu
Автор

If the code of function is replaced with display() in main, so it looks like at 2.26 min then where is variable 'a' initialized? You also mentioned there is no need use stack so where is that variable?

MrIglaq
Автор

Thank you for the video, great explanation :D

johnk
Автор

Why is the execution time given in the black window greater when you use the inline function ? Shouldnt it be less ?

rishieramratan
Автор

basically we will nt use this inline in the program anymore from next time ...

sagarsinghbhandari
Автор

I didn't know about inline before, thx a lot, but I haven't heard, if the big or small func wasn't convient? large? why? because of his size?

usuncxh
Автор

does it serve the same purpose of a macro?

Hrushivit
Автор

hello by default a function is i line or outline?? and what is an outline function

amansrivastava
Автор

I'm confused. As you said Inline actually increase speed of execution

But when you run first time it took 0.095sec. but when you used it as inline it's execution time was 0.110

So, time is increased. How can you justify this?

psycho.u
Автор

#include <iostream>
Using namespace std;
Void display(int, int, int);
Int main()
{
Display();
Return0;
}
Void display(int a=9, int b=8, int c=7)
{
Cout << a<<endl;
Cout << b<<endl;
Cout << c<<endl;
}
I m getting error as follow,
Error: no matching function for call to 'display'

shyamranjanverma
Автор

can we give parameters int&float at same time?

manyamsriharipriya
Автор

Sir I have a doubt how to use inline in function prototyping????

madhuram
Автор

Why it is not present in C.
Is there any limitations to this, scope.

parimimohanavamsi
Автор

Bro your code is does not working why please tell me

masihuddinkhan
Автор

Can we do inline along with prototyped function?

pratikdesai