Why are function pointers useful?

preview_player
Показать описание
Source code can be found here:

===== Support us through our store =====

===== Check out our website =====

===== Check out our Discord server =====
Рекомендации по теме
Комментарии
Автор

2 days of watching videos about pointers, and I found THIS GEM. Watching with mindset of "I want to see in practice, how pointers actually work and what makes them superior over working with variables", you Sir, actually did a job on me. Despite learning coding on my own just to learn something new, I hit a several walls in Cpp, C#, Python where I had problem on passing methods inside methods. Thanks a lot for this gem!

datenshiddd
Автор

We needed this for one of our tasks today, you saved our bums :D

lag
Автор

Bravo, frate. Super tutorial. Felicitări !

alauda_projects
Автор

I was struggling to understand the use cases of pointers and I need this kind of real use in order to be motivated about learning a concept, so your video was a good help. Thanks for your effort and explanation.

aldekorea
Автор

Not many people talk about this. Function pointers are exciting! God bless you for doing this!!

davidliverman
Автор

that was really useful, thanks gentleman

moha_kunX
Автор

I find function pointers extremely useful in the case of implementing some kind of a shell or command line with a dictionary/map data structure where a string(command) corresponds to a function executing the command.
I implement something like this in C# for a college project, at that point we weren't taught delegates(C#'s function pointers) and were expected to do it with switch cases, since I was too lazy I implemented a shell with a dictionary of commands which corresponds to it's delegate.

sagivalia
Автор

Wow. this was amazingly explained. and easily followed. well done!

dylanhabedank
Автор

Very good explanation! Good job and keep up the great work!!!

dancedance
Автор

It's is the best video which gave me more clarity about pointers, can I know little more about it?

mohdfarhanmulla
Автор

thanks a lot! you are my best c coach, I just understand in C++, if transfer a function, we dont really need to use &fun_name. but in c, we have to

rkzxltk
Автор

i like your videos its easy to understand

aitbelhajayoub
Автор

Nice vid… I feel like you might be able to accomplish this even easier with a template

plumtreegarden
Автор

at 3:45, why you use & in function call and * in function definition, can it be interchanged? I heard that I should use & in arguments of function definition as often as possible.

parampampam
Автор

I understand it but why use pointers over references and maybe could you show why pointers are used in the windows api (Win32 api), thanks

Dulge
Автор

Imagine i have an class with set of foo's: foo1(), foo2(), foo3(), foo4(), ..., fooN(). And i also have a member function "execute_foo(int n)" that takes a number as a parameter and executes the related to this number fooN(). I know how to implement it with switch-case construction. But i will get suffer writing a 100 "case" statements. Is it possible to do it without huge code?

pogchamper
Автор

nice tutorial!
whats about sockets in c?

talroz
Автор

So, a hack-ish way of making functions first class in C?

pattyspanker
Автор

Can you save encrypted txt files in C ?

hugo-garcia
Автор

sound of keyboard is very bad please reduce it ! you are great in speed writing but the sound is noisy

mechxware