CONST in C++

  Рет қаралды 398,979

The Cherno

The Cherno

Күн бұрын

Patreon ► / thecherno
Twitter ► / thecherno
Instagram ► / thecherno
Slack ► slack.thecherno.com
In this video we're going to take a look at the const keyword and how it works with pointers, references, and class methods.
Series Playlist ► • C++
Gear I use:
-----------------
BEST laptop for programming! ► geni.us/pakTES
My FAVOURITE keyboard for programming! ► geni.us/zNhB
FAVOURITE monitors for programming! ► geni.us/Ig6KBq
MAIN Camera ► geni.us/t6xyDRO
MAIN Lens ► geni.us/xGoDWT
Second Camera ► geni.us/CYUQ
Microphone ► geni.us/wqO6g7K

Пікірлер: 561
@jean-naymar602
@jean-naymar602 7 жыл бұрын
For people having trouble remembering the order in which const keyword is to be used, here's a quick tip. You have to read it backward, like the compiler does. For instance : -const int * A; ==> "A is a pointer to an int that is constant." (or, depending on how you prefer to write it) int const* A; ==> "A is a pointer to a const int" but both are the same as explained in the video. -int * const A; ==> "A is a const pointer to an int." -const int* const A; ==> "A is a const pointer to an int that is constant". EDIT : As mentionned by simo simo in the comments bellow, const int * A does not mean that A actually points to a const variable. It just means that the compiler will not allow you to modify the pointed value *through* A. for instance : int val = 10; int const * a = &val; *a = 30; //this will NOT compile, you're not allowed to modify "val" through "a". val = 30; //this will compile. Same with : int val = 10; int val2 = 30; const int * const A = &val; A = &val2; //will NOT compile : you can't modify what A points to. *A = 30; //will NOT compile : you can't modify val through A val = 30; //this will compile, val is not constant
@h.hristov
@h.hristov 7 жыл бұрын
Jean-Nay Mar Awesome tip. Thanks :)
@afterbunny257
@afterbunny257 5 жыл бұрын
lol, it works out perfectly!
@TheBellite
@TheBellite 5 жыл бұрын
Great tip! Thanks.
@kmattrichards64
@kmattrichards64 5 жыл бұрын
this has to be the best explanation, awesome!
@suryarocks8647
@suryarocks8647 5 жыл бұрын
Thanks
@inserteunnombreapropiado9079
@inserteunnombreapropiado9079 3 жыл бұрын
More simply: a _const_ is like a: "if I modify this, please give an error calling me an idiot because I modified a _const_ ".
@yashbhatt4498
@yashbhatt4498 2 ай бұрын
Const can be modified but in terms of constant there is no such a thing cuz it's literal...
@HornyVegan
@HornyVegan 7 жыл бұрын
Your C++ vids are the best on youtube, don't stop ^^
@websurfer5283
@websurfer5283 6 жыл бұрын
If people like, please visit his patreon page. I will certainly be contributing come 1st of next month. As I think u get a months benefit from start of each month.
@jeremymesloh1981
@jeremymesloh1981 4 жыл бұрын
Agreed!
@mjthebest7294
@mjthebest7294 4 жыл бұрын
Also check ChiliTomatoNoodle, he is impressive as well. :)
@rudiger86
@rudiger86 2 жыл бұрын
Can’t stop, won’t stop
@Aragubas
@Aragubas Жыл бұрын
true x3
@KeybladeMasterCam
@KeybladeMasterCam 4 жыл бұрын
The C in C++ stands for Cherno. I'm convinced.
@chhayanksharma3926
@chhayanksharma3926 3 жыл бұрын
you mean Charno?
@victormamede7004
@victormamede7004 3 жыл бұрын
What about the C in C?
@chhayanksharma3926
@chhayanksharma3926 3 жыл бұрын
@@victormamede7004 The C in C stands for C++
@chhayanksharma3926
@chhayanksharma3926 3 жыл бұрын
@@AbhishekBM it stands for C
@Brahvim
@Brahvim 2 жыл бұрын
@@chhayanksharma3926 *C -Sorry, shouldn't question a joke :joy:-
@cexplr2431
@cexplr2431 4 жыл бұрын
"C++ man ... That's how it rolls.." HAAHAHAHAH
@sroentoel
@sroentoel 6 жыл бұрын
Bucky teaches the cpp fundamental level, you teach the advanced one. Brilliant guys on KZfaq
@fburnrostro95
@fburnrostro95 6 жыл бұрын
ah @thenewboston is indeed ol' reliable
@alexandergonzalez5975
@alexandergonzalez5975 6 жыл бұрын
sroentoel Is Bucky coming back?
@rajesh09ful
@rajesh09ful 5 жыл бұрын
I Second that, also feel Master Bo Qian need a mention here, most def
@rajesh09ful
@rajesh09ful 5 жыл бұрын
I Second that, also feel Master Bo Qian need a mention here, most def
@MsJavaWolf
@MsJavaWolf 4 жыл бұрын
@@rajesh09ful Yes his videos are great. I think he stopped uploading sadly.
@parth46767
@parth46767 5 жыл бұрын
"Now let's put const everywhere"
@basedworldsk8
@basedworldsk8 4 жыл бұрын
I'm taking a upper division c++ class at uni with a really old professor who can't teach.... you're saving my life
@soniablanche5672
@soniablanche5672 4 жыл бұрын
Every programming language ever: let's create a "constant" array ... then change the values inside it :^)
@thomascreel6522
@thomascreel6522 3 жыл бұрын
the size is constant
@cvbattum
@cvbattum 3 жыл бұрын
@@thomascreel6522 That's true for all arrays. As soon as you change the size, you reassign it with a different array, so it's no longer the same array with the old size. Now, of course, const prevents that and only that.
@thomascreel6522
@thomascreel6522 3 жыл бұрын
@@cvbattum No, the number of elements in the array is immutable and you must create a new array of a different size and move the old array elements into it.
@AlFredo-sx2yy
@AlFredo-sx2yy 2 жыл бұрын
@@thomascreel6522 uh... that's exaclty what the other guy said tho...
@rafaelmenna8384
@rafaelmenna8384 Жыл бұрын
That’s why we have (tuples) in python.
@LucidStew
@LucidStew 7 жыл бұрын
Learned a few things, and this clarified my thinking on const greatly, so thank you, sir.
@786balgoo
@786balgoo 4 жыл бұрын
You saved my life cherno... I love your tutorials and I would love it even more if you make 2d game tutorials in c++.
@reflectiveradiosity6664
@reflectiveradiosity6664 5 жыл бұрын
Was really confused and this made it a whole bunch clearer, again your videos are straight to the point, and relatively easy to follow! Thanks!
@AviPrakriti
@AviPrakriti 5 жыл бұрын
These videos are addictive. I am coding for long time and know most of it, still watching this playlist is so refreshing. I feel like exploring every details of C++ all over again and play with it. Great job @TheCherno! Your Game Engine series is also another gem engine! Big thanks
@YogeshSharma-hg4lx
@YogeshSharma-hg4lx 5 жыл бұрын
Geming engine lol
@nahuelarjona
@nahuelarjona 4 жыл бұрын
Funny short story, demonstrating all acquired Cherno-skills: I went ahead and compiled the code showed on 2:53. I wanted to see *if I could force a change to the const MAX_AGE using the a pointer* . *The code:* _const int MAX_AGE = 90;_ _int* a = new int;_ _a = (int*)&MAX_AGE;_ _*a = 85;_ _std::cout
@thanostitan.infinity
@thanostitan.infinity 4 жыл бұрын
wow! that's amazing seriously! I had this doubt too, and was thinking and playing with it to understand it. So double wow and thanks haha.
@spyrex3988
@spyrex3988 Жыл бұрын
its been 2 years but thats crazy
@swaw11
@swaw11 Жыл бұрын
Thanks! I did the same and was confused!
@BinGanzLieb
@BinGanzLieb Жыл бұрын
puh thats is crazy and error-prone for beginners. i have to keep that in mind, thank you
@rayysw
@rayysw 3 жыл бұрын
"const is basically sort of like a promise that you give, in which you promised that something will be constant, that is it's not going to change. However, it's just a promise and you can bypass that whole 'promise', and you can break your promise just like you can in real life." I came here to learn more about C++ but I get legit life lesson instead...
@TheBellite
@TheBellite 5 жыл бұрын
Gold! As a longtime hobbyist programmer who's new to C++, these videos are amazingly helpful.
@Weredah
@Weredah 7 жыл бұрын
Thank you so much for clearing up const's I really appreciate this series :D
@more_than_just_sentient
@more_than_just_sentient 3 жыл бұрын
Hey, I saw just two videos and clicked the sub button , your videos are really high quality and I left with a lot of answers than questions when I finish watching . Keep up the hard work . Cheers .
@manonthedollar
@manonthedollar 3 жыл бұрын
Thank you for all your videos! I just finished working through a C++ book, and I'm at the point where I try to make my first "thing," and I go "uh oh I still don't know anything." These videos are excellent for solidifying my understanding of things that I remember reading about, but do not yet have an instinct to know if I'm using them correctly yet in my own work.
@serkanozturk4217
@serkanozturk4217 Жыл бұрын
Personal notes: - reading backwards helps understanding what is constant - making a class method constant says that that method will not change any of the class member - defining a function outside of the class and passing class instance as a constant reference makes sure that the instance won’t change. Thus, any method in that function must be const, otherwise you get error
@dhu1090
@dhu1090 2 жыл бұрын
You are so knowledgeable!! I don't know how I'd learn C++ without you!! 🙏🏻
@shvideo1
@shvideo1 2 жыл бұрын
Comprehensive and to the point. A great tutorial. Crystal clear. Thanks a lot for your effort.
@romanprykhodchenko1551
@romanprykhodchenko1551 4 жыл бұрын
You are the best!!! Really structured and easy to understand lessons!) Very useful for any kind of the projects) Thanks bro!
@ehsan18t
@ehsan18t 3 жыл бұрын
Man! I never understand this const properly. I learned everything I could find in books, lectures and other c & c++ videos on KZfaq. But this is the only video that solved all of my confusion on const. Thanks a lot man.
@Hetp111
@Hetp111 5 жыл бұрын
Thanks! The level of depth you go in is amazing!
@TheMR-777
@TheMR-777 4 жыл бұрын
Hey man, I've never seen these in-depth concepts before in my University! Many thanks for this!
@pixarfilmz4769
@pixarfilmz4769 6 жыл бұрын
This is how I see c++: const *int &int const ***const const *** &const
@MsJavaWolf
@MsJavaWolf 6 жыл бұрын
We had something like that as questions in university, but every reasonable programmer avoids stuff like that.
@angelstojanov2346
@angelstojanov2346 6 жыл бұрын
Same here, when I studied C I had a test with an expression full of illogical pointers
@bombrman1994
@bombrman1994 6 жыл бұрын
schools teach and test programming using the worse method and discouraging students so much. In my C++ course i thought about droping the class so many times bcuz of my mark, on the other side i have good understanding on C++. It never makes sense bcuz schools care for mark and never for the diamond someone got in his brain
@haroldfinch360
@haroldfinch360 6 жыл бұрын
If you have a good understanding of C++, how can your grades be bad then?
@bombrman1994
@bombrman1994 6 жыл бұрын
Harold Finch because when my mother language is not English and the question in a test is a paragraph long asking to write a single line code. That’s when I start making mistakes. Programming instructors are not often found in every school
@mkhadka123
@mkhadka123 Жыл бұрын
you are a reason I fell in love with c++ language again, your c++ videos are simply awesome :)
@ashiinsane90
@ashiinsane90 7 жыл бұрын
bro your channel is a gold mine i just started learning C++ also new to programming but your vids help alot. would love to see u do games like asteroids and snake etc with C++
@unstablethermalpaste3366
@unstablethermalpaste3366 Жыл бұрын
You are the best one I found so far with a clear eng accent that is able to help me learn C++. No offense to other KZfaqrs with strong accents.
@nedboulter9187
@nedboulter9187 7 жыл бұрын
Really nice tutorial, I already know C++ and I just ran across this, but it still cleared a couple of things up, in terms of the mutable keyword at whatnot. I will probably keep watching these in case there is anything else I missed :) :)!!
@tyroneslothdrop9155
@tyroneslothdrop9155 6 жыл бұрын
Thank you for using a dark theme with your coding examples. It makes a massive difference.
@Flewkey1337
@Flewkey1337 4 жыл бұрын
You really did make me understand what const's are and how do they work, have been trying to find answer to it from so many websites and videos I can't believe I now understood it all. Really thank you so much!!
@4wen_main
@4wen_main 6 ай бұрын
These kind of details will take us countless hours to grasp from reading a book (with omission often), this is amazing.
@furkanmacit4040
@furkanmacit4040 4 жыл бұрын
i have been searching c++ videos in several platforms for two weeks i think i have finally found a good one
@YektaSarioglu
@YektaSarioglu 5 жыл бұрын
Simple and clear explanation. Keep up the good work, friend 👍
@RoaiDude1
@RoaiDude1 6 жыл бұрын
You are seriously the best code teacher I've seen and I bought something like fifty udemy courses.. keep the good work and combining assembly and c++ together! Its great and im learning alot even as a long time java programmer! Thank you a lot!!!
@raymondyoo5461
@raymondyoo5461 6 жыл бұрын
What a clarity I found here :) Thank you soooooo much!
@0x_Anakin
@0x_Anakin 5 жыл бұрын
You have the best c++ tutorials in youtube dude
@yacinemathurin2013
@yacinemathurin2013 5 жыл бұрын
For people having trouble with the (const Entity& e), it's just that the function can't accept any instruction able to change the object (one of it's parameters) as you've set it const.
@lewisb8634
@lewisb8634 7 жыл бұрын
Fantastic video Cherno as usual, thank-you for uploading! What is your opinion on using const everywhere possible? I came across big flame war on StackOverflow recently between people that supported the 'security' and 'consistency' of using const wherever physically possible and those that said it was an eyesore. We're talking about using const literally everywhere - a simple 2 line function that takes in one integer to use in some quick calculation? It must take in a const int because the value is not modified. Would you say it is an eyesore to have it everywhere or do you think there is some benefit?
@sachinnair8375
@sachinnair8375 4 жыл бұрын
Thanks man ..... your tutorials are very clear to follow.✌️
@Prashantkumar-pn6qq
@Prashantkumar-pn6qq 3 жыл бұрын
03:28 "Now let's start adding const everywhere" - Cherno be like - let the games begin baby😂
@alecmather
@alecmather Жыл бұрын
Literally amazing video, just answered all my questions about const (and more) in 12 minutes, you're a GANGSTER
@TheJorge100
@TheJorge100 5 жыл бұрын
For anyone still struggling. A good way to read these statements is from right to left. Example: const int * (pointer to an int constant), int const * (pointer to a constant int), int * const (constant pointer to an int), const int* const (constant pointer to a constant integer)
@GfastGao
@GfastGao 5 жыл бұрын
Man, I start to think if I really should pledge through patreon to this series, because you are the correct one for me. INDEED.
@AdityaKumar-xw2yx
@AdityaKumar-xw2yx 5 жыл бұрын
Dude you are great!! you have really make the things very simple!!
@NexGenSlayer
@NexGenSlayer 7 жыл бұрын
Love your videos! So helpful. Could you bring back the suspenseful music though, it engages the audience making the videos even more exciting! Also, what happened to you mic from the first videos in this series (it sounds like you are recording with mono in a smaller room)?
@calecacciatore5422
@calecacciatore5422 5 жыл бұрын
dont forget that const makes a variable local to the file. that is, only visible in the actual translation unit. you can have 2 const variables with the same name in different files and it will compile fine. so basically they re implicitly static.
@piyushphodu
@piyushphodu 3 жыл бұрын
this video is the best const in C++ explanation till date i ever watched
@rhyscabonita5933
@rhyscabonita5933 5 жыл бұрын
As someone who's only approaching intermediate: Ahhhh.... Wait, holy. hell. what?!?.... Okay.. What.
@Deadshot-fz5gx
@Deadshot-fz5gx 4 жыл бұрын
I feel that bro
@MirrorsEdgeGamer01
@MirrorsEdgeGamer01 4 жыл бұрын
@@Deadshot-fz5gx Me too.
@TW19567
@TW19567 10 ай бұрын
Absolutely the clearest explanation of const out there!
@372leonard
@372leonard 7 жыл бұрын
are you ever gonna do function pointers?
@Steven-tw7iz
@Steven-tw7iz 7 жыл бұрын
Paul Leonard Boon I definitely think he should. That would be an awesome topic
@Hopsonn
@Hopsonn 7 жыл бұрын
I hope not, that is more a C thing. In C++, "std::function" should be used
@brod515
@brod515 6 жыл бұрын
Why are you Guys on this playlist
@aubreymatende6497
@aubreymatende6497 3 жыл бұрын
im loving these videos, i am asking if you can make a video on friend functions
@mikedoeren5960
@mikedoeren5960 Жыл бұрын
The best video on the const keyword, and it's not even close. Good stuff!
@rcookie5128
@rcookie5128 7 жыл бұрын
daym, so much to take care of when working with const stuff..
@ericrussell5304
@ericrussell5304 7 жыл бұрын
In some ways the opposite is true. If you get const right in your program, you'll have to worry less about what you do with your objects. Without const it would be like having a bunch of global variables that might get changed without warning. With const, I can give you an const object and not worry about you changing it...like a map's key.
@MitLiebezurMusik
@MitLiebezurMusik 3 жыл бұрын
This channel is awesome!!! Thank you for sharing your knowledge :)
@can3792
@can3792 Жыл бұрын
i am on the patreon and donated . i cant thank you enough. please carry on taking video in c++ :)😀 keep up the good work
@ezequielzion
@ezequielzion 3 жыл бұрын
te amo cherno acá te estamos viendo con un amigo muchas gracias!!!!
@informativecontent4778
@informativecontent4778 6 жыл бұрын
man o man you are awesome and most the programming i learnt is beacuse of you and buckey
@zuhail339
@zuhail339 4 жыл бұрын
I really like how he does sarcasm in the middle of a serious lesson ! But I guess that's how it rolls😂
@10bokaj
@10bokaj 6 жыл бұрын
dud, your knowledge exceeds the physical barrier of the realm
@jingfenghong2312
@jingfenghong2312 6 жыл бұрын
Thank you. Could you also introduce a little bit more about return constant, return reference and return constant with reference? I'm confused about these three things.
@nidhalabidi69
@nidhalabidi69 4 жыл бұрын
a great explanation thank you !!
@eyalpery8470
@eyalpery8470 4 жыл бұрын
Thanks! Refactored my whole program at work
@NefKamerzon
@NefKamerzon 4 жыл бұрын
"Haha, point out" That was comedy gold
@xintong3635
@xintong3635 6 жыл бұрын
Really helpful, thanks a lot
@petrkassadinovich2705
@petrkassadinovich2705 5 жыл бұрын
Thank you Yan for your tutorials! PS: now I can understand: const int* const Method(const int& const p1) const;
@SimonK91
@SimonK91 2 жыл бұрын
Only problem is that references are already "hard pointers", so "const int& *_const_* p1" doesn't work (2+ years old comment, and 4+ year old video, though for some reason I ended up here)
@mryup6100
@mryup6100 4 жыл бұрын
Well, I finally underatand! Thanks Cherno! Const has always confused me.
@rajcodes100
@rajcodes100 4 жыл бұрын
Great Video thanks - I learnt some new stuff here .
@mytech6779
@mytech6779 6 жыл бұрын
Thinking way back to my short time with C. Constant was a term used when using the preprocessor directive #define to name literal values. The purpose was similar to why you might use a named function rather than writeing inline statements(only need to write it or change it in one place), the question is why not simply assign the value to a variable name. The given reason was that it helped produce faster running and more compact machine code because the compiler must consider that variables are potentially ... variable and mutable at run time while constant literals don't change at run time and can be more easily handled by the compiler in the optimizing stage. Of course that book was from 1993, compiler optimizers have improved enough since that they can likely take up the slack if the programmer takes the easy route like declaring a variable when a constant literal value is the intent. And that was C89 not C++14
@syedrizvi2687
@syedrizvi2687 3 жыл бұрын
Love your videos, thank you so much!
@kartikxramesh
@kartikxramesh 4 жыл бұрын
This was such a good video!!! Multiple *holy shit* moments for me throughout the video. This is better than Breaking Bad ngl.
@KishanKumar-mz3xr
@KishanKumar-mz3xr 4 жыл бұрын
Easy to remember like this: * const -> pointer(*) is constant(const) const * -> constant(const) value at pointer(*)
@IshakHeor
@IshakHeor 3 жыл бұрын
One of the best teachers ever!!!
@sangdilbiswal30
@sangdilbiswal30 Жыл бұрын
this is a complete video I was looking for thanks sir.
@davidl.castillo7517
@davidl.castillo7517 5 жыл бұрын
really good video !! I love it.!!
@thelstan8562
@thelstan8562 6 жыл бұрын
Amazing! Thanks a lot!
@Zentamusic
@Zentamusic 4 жыл бұрын
soooo helpful man thanks
@1Naif
@1Naif 7 жыл бұрын
*You the best.*
@user-em9mw9ch3y
@user-em9mw9ch3y 6 жыл бұрын
[Error] Expected " 're " after the string "You"
@ninjacat7580
@ninjacat7580 6 жыл бұрын
Maybe you can use the insert function to fix it ^_^
@apenasmeucanal5984
@apenasmeucanal5984 4 жыл бұрын
i appreciate ya
@Cynokine
@Cynokine 7 жыл бұрын
Thankgs for the great vid, I feel this is how I should have been taught programming. One question Cherno, how do you move around in your IDE ? Do you use the arrow keys, the mouse or some other bindings ?
@pradyumnkejriwal3007
@pradyumnkejriwal3007 7 жыл бұрын
Constantin Chabirand the arrow keys I guess
@ali-void
@ali-void 7 жыл бұрын
I know how he does it. He uses Ctrl + Shift and the left, right arrow keys to highlight a group of words and then copies and pastes somewhere else. Try it, it's really cool!
@IssamHalabi
@IssamHalabi 6 жыл бұрын
If you ever worked with Emacs, you know there's like 30 different movement commands.
@gunrunjk
@gunrunjk 6 жыл бұрын
Thanks for detail explanation. :)
@rjle2446
@rjle2446 Жыл бұрын
Super helpful. Thank you!
@hpeterh
@hpeterh Жыл бұрын
Pretty clear, thank you. It should be noted, if a global variable is declared as "const" or a variable is declared "static const", then it is placed by the linker into a non writable CODE or CONST segment. When it is written to by some pointer trickery, an access violation exception will probably happen.
@choosyguytest719
@choosyguytest719 5 жыл бұрын
Fantastic, thank you!
@thomasmathews4592
@thomasmathews4592 5 жыл бұрын
Great video. Could you consider doing constexpr as well?
@autogenes
@autogenes 2 жыл бұрын
This is one of the more entertaining episodes :D
@chrischauhan1649
@chrischauhan1649 5 жыл бұрын
Awesome video. By the way which IDE you are using in this video??
@celestialmaat9462
@celestialmaat9462 Жыл бұрын
I spent like 20 minutes and then looked you up🤯🤯🤯! Thanks
@jawadelmokhliss1214
@jawadelmokhliss1214 5 жыл бұрын
thanks for the effort
@tsibulsky4900
@tsibulsky4900 2 жыл бұрын
Thank you very much for your videos 👍 Very useful
@danielc4267
@danielc4267 5 жыл бұрын
const video* const Upload() const {} Cherno, please upload videos constantly and make it an immutable fact. :D
@kaiwenliang2891
@kaiwenliang2891 6 жыл бұрын
Superb!!
@karmaindustrie
@karmaindustrie 5 жыл бұрын
const bool confusion = true;
@kushnayak1619
@kushnayak1619 4 жыл бұрын
ok
@karmaindustrie
@karmaindustrie 4 жыл бұрын
@@kushnayak1619 I want to know the mindset that led you to write "ok" and I also want to know the mindset that led somebody to give you a like after at most 8 hours. Because I want to benefit from the law of attraction fully.
@kushnayak1619
@kushnayak1619 4 жыл бұрын
@@karmaindustrie ok
@karmaindustrie
@karmaindustrie 4 жыл бұрын
@@kushnayak1619 So I guess the answer is: You don't really want to benefit from the law of attraction. What a pity. I want to inform you that I am very cool.
@karmaindustrie
@karmaindustrie 4 жыл бұрын
@@kushnayak1619 And also, to all the other people: It looks like you are liking your own comments because you got one like again after 23 minutes. This feels like a psychological disease to me, right now :) - Correct me if I'm wrong. Plausible. Try.
@mohamadelmahdihoumani4239
@mohamadelmahdihoumani4239 3 жыл бұрын
Can you make the video on how you type this fast in VS? Amazing content btw !
@Impulse_Photography
@Impulse_Photography 4 жыл бұрын
You should make some videos on specific Design Patterns, in particular (for me) the Strategy Pattern in C++. Maybe, recommend some books for learning the main Design Patterns every programmer should know ...
@PythonisLove
@PythonisLove 2 жыл бұрын
awesome explanation
@youssefmuhamad3213
@youssefmuhamad3213 5 жыл бұрын
Awesome video, you saved me
@qutadahrababah6644
@qutadahrababah6644 3 жыл бұрын
cant we also declare the variable in a private class? Will this give us same functionality? Thanks for the great videos!
@vineethnarayanavakicherla7219
@vineethnarayanavakicherla7219 2 жыл бұрын
Good explaination cherno sir
The Mutable Keyword in C++
6:56
The Cherno
Рет қаралды 170 М.
WHY did this C++ code FAIL?
38:10
The Cherno
Рет қаралды 240 М.
لقد سرقت حلوى القطن بشكل خفي لأصنع مصاصة🤫😎
00:33
Cool Tool SHORTS Arabic
Рет қаралды 25 МЛН
A little girl was shy at her first ballet lesson #shorts
00:35
Fabiosa Animated
Рет қаралды 16 МЛН
Should I pass by const reference or by value?
10:45
The Cherno
Рет қаралды 101 М.
Why The Windows Phone Failed
24:08
Apple Explained
Рет қаралды 175 М.
Stack vs Heap Memory in C++
19:31
The Cherno
Рет қаралды 560 М.
31 nooby C++ habits you need to ditch
16:18
mCoding
Рет қаралды 755 М.
how Google writes gorgeous C++
7:40
Low Level Learning
Рет қаралды 838 М.
A const int is not a constant.
9:16
Jacob Sorber
Рет қаралды 67 М.
Master Pointers in C:  10X Your C Coding!
14:12
Dave's Garage
Рет қаралды 293 М.
لقد سرقت حلوى القطن بشكل خفي لأصنع مصاصة🤫😎
00:33
Cool Tool SHORTS Arabic
Рет қаралды 25 МЛН