C++ POINTERS (2025) - How to use pointers and arrays (for beginners) PROGRAMMING TUTORIAL

  Рет қаралды 143,496

CodeBeauty

CodeBeauty

Күн бұрын

Пікірлер: 159
@CodeBeauty
@CodeBeauty 3 жыл бұрын
📚 Learn how to solve problems and build projects with these Free E-Books ⬇️ C++ Lambdas e-book - free download here: bit.ly/freeCppE-Book Entire Object-Pascal step-by-step guide - free download here: bit.ly/FreeObjectPascalEbook 🚀📈💻🔥 My Practical Programming Course: www.codebeautyacademy.com/ Experience the power of practical learning, gain career-ready skills, and start building real applications! This is a step-by-step course designed to take you from beginner to expert in no time! 💰 Here is a coupon to save 10% on your first payment (CODEBEAUTY_YT10). Use it quickly, because it will be available for a limited time.
@morfisiuslizerro6400
@morfisiuslizerro6400 2 жыл бұрын
Please, use "an" instead of "a" before words that begin with a vowel: an operation
@morfisiuslizerro6400
@morfisiuslizerro6400 2 жыл бұрын
beautiful Saldina, sorry!
@sayaleeambulkar8863
@sayaleeambulkar8863 3 жыл бұрын
Everything seems easy when taught by you😌
@silverstar3417
@silverstar3417 3 жыл бұрын
Finally, I have found the best teacher in the world!
@CodeBeauty
@CodeBeauty 3 жыл бұрын
🥰🙏💙
@licinio3
@licinio3 3 жыл бұрын
I saw several videos in this channel and I think it is a great course/s to learn, to remember several essential concepts of programming. Great! Many thanks :)
@optane3336
@optane3336 4 жыл бұрын
you're soo underrated you deserve a lot more subs than you have right now
@sofiavaleriatorochambi4234
@sofiavaleriatorochambi4234 2 жыл бұрын
This just blew my mind, I'm learning c++ for a project, the reference code I found is so confusing so I was just watching some youtube videos to understood, and yours is really well explained, thank you! It was an absolute mind-blowing to me 🤯❤
@muhammadumernadeem725
@muhammadumernadeem725 4 жыл бұрын
Beautifully explained + You said Derefrenciate 5 times.
@CodeBeauty
@CodeBeauty 4 жыл бұрын
Hahaha, I filmed a couple of videos that day and edited only this one so far. I hope that there will be no "derefrenciate"-s in the other ones. 🤭
@muhammadumernadeem725
@muhammadumernadeem725 4 жыл бұрын
@@CodeBeauty These minor mistakes doesn't matter in front of all the efforts you are putting in these videos.
@patrickgemayel4326
@patrickgemayel4326 2 жыл бұрын
Thanks!
@making.fronds
@making.fronds 2 жыл бұрын
I'm starting my final year papers at uni, my algorithms and data structures paper uses c++ and the way they explain things is soooo much more confusing than you do!! I felt like you explained linked lists SO well that I'm going to watch this whole pointers series, even tho I've already learnt them, I don't fully get it. I hope you have content for all the other topics we learn!! Thank you!!
@CodeBeauty
@CodeBeauty 2 жыл бұрын
I'm sure that you'll learn si much from this course, and that all the pieces will come together and complete your knowledge of pointers ☺️☺️
@AKhan-3
@AKhan-3 3 жыл бұрын
One solution for the last part is to use: sizeof(luckyNumbers) or luckyNumbers.size() in the for loop condition. So we can avoid accessing memory location not belonging to us.
@k2305Pawan
@k2305Pawan 2 ай бұрын
It will cout 20 instead of 5, try int getArrayLength = sizeof(myNumbers) / sizeof(myNumbers[0]); cout
@painsme2
@painsme2 3 жыл бұрын
I know you mention it's tough recording video's while trying to break the language barrier. I have no issue understanding anything you say nor do I even notice the little thing's that you mention in these pop ups about some mispronounced word. I never even notice and I'm grateful that you took the time to do it in such a manner. I would have missed out had this been in any other language as I'm unable to speak any other myself. Cheers!
@bbains963
@bbains963 Жыл бұрын
For the first time in 4 months, I'm finally able to understand pointers thanks to you.
@danwatgu
@danwatgu 3 жыл бұрын
Thank you very much!!!! The best classes I've received.
@MohamadrezaVafaieekia
@MohamadrezaVafaieekia 5 ай бұрын
One of the best course's I have ever find! tnx a lot from Iran❤️
@CodeBeauty
@CodeBeauty 5 ай бұрын
I'm happy to hear that. Many greetings for you! 🥰🥰
@eyuelsolomon2625
@eyuelsolomon2625 3 жыл бұрын
Thanks a lot Now I finally understand them I Feel I'm ready for tomorrow's final exam
@Gary-vo9rm
@Gary-vo9rm 3 жыл бұрын
I haven't used c++ or computers in 15yrs. Kinda interesting to refresh -- especially from such a babe!
@ruachmajiokkhor6103
@ruachmajiokkhor6103 3 жыл бұрын
thank you so much,your voice is so nice even it leads me to understand easily
@GitMike
@GitMike 3 ай бұрын
Thank you for the help, explained it very well.
@leoespejo7437
@leoespejo7437 9 ай бұрын
Such an amazing explanation. I was checking on a very well know online course, specifically for how to combine Pointers and Arrays and they include Stack and Heap in the explanation trying to clarify but that was really confusing then I found this video and this is very concise, straight to the point and very well explained, I loved it. Now I am ready to continue with me C++ project 😊
@paulhendrix8599
@paulhendrix8599 4 жыл бұрын
Thanks for the great video! Minor nitpick/addition (from my understanding, please correct me if I'm wrong!) regarding the array overshoot at 10:07: The data accessed there is "not ours" in the sense that it doesn't belong to the array, but it's not really "someone else's" in the sense that it belongs to another program - the memory belongs to the program being run. If you try to access memory outside of that allocated for your program you'll get a segmentation fault - you can try this out by overshooting the array by a larger number (2000).
@IrisFlorentinaA
@IrisFlorentinaA 3 жыл бұрын
did as you said!! got this " Exception thrown at 0x009A6010 in Pointers and arrays.exe: 0xC0000005: Access violation reading location 0x00F61000. " thanks!!!
@danhhohuu8766
@danhhohuu8766 3 жыл бұрын
these course are very clear and the language is clear to for french guy
@foodtips8515
@foodtips8515 2 жыл бұрын
Best coding lesson ever
@culu37
@culu37 2 жыл бұрын
I wish I found this channel sooner lol
@BrothonAlone
@BrothonAlone 3 жыл бұрын
Excuse me teacher system(pause>0) What's it means? please kindly explain thanks.
@Tony770jr
@Tony770jr 3 жыл бұрын
Very thorough videos... Thanks!
@maxim25o2
@maxim25o2 3 жыл бұрын
curly brackets are shortened for pointers, the long usage is *(luckyNumbers + 2) and short representation for this same is luckyNumbers[2] . Functionality of that two is exactly this same, but second one a lot of times is misunderstanding by new peoples who start learning C++ and C. Peoples teaching arrays forget to mention that this is dereferencing pointer style, that so important stuff causing peoples who try to learn it are doing mistakes in programming and have hard time to fixt that. Especially when function come in to play. Passing array of pointers using that quotation luckyNumbers[2] cause problems, when is time to deference it.
@Dannnneh
@Dannnneh 3 жыл бұрын
5:18 what hotkeys do you use to comment out the highlighted text?
@CodeBeauty
@CodeBeauty 3 жыл бұрын
Hold Ctrl and pres K and C 😊
@kultureislame
@kultureislame 3 жыл бұрын
5:18 what do you press for commenting the lines Saldina?
@agreensh
@agreensh 4 жыл бұрын
Just to note, your last example (going past the end of the array) may cause a crash, and not do the cout (depends on the memory layout eg the pointer could go into reserved memory).
@CodeBeauty
@CodeBeauty 4 жыл бұрын
Good point! In higher-level languages this is handled, in C++ you have to take care of it yourself and must not go out of the index range of the array. 🙌
@onurolce
@onurolce 4 жыл бұрын
@@CodeBeauty That's Operation System's main job, put borders between applications :)
@dasoft
@dasoft 3 жыл бұрын
Ca you explain more clearly why we should be careful with memory allocation?
@lexico9191
@lexico9191 8 ай бұрын
Thank you so much ma'am. You really make programming very fun and interesting.
@thedarkbountyhunter7592
@thedarkbountyhunter7592 6 ай бұрын
This is the best video i could find, thx ma'am 🎉🎉
@dalerobinson3091
@dalerobinson3091 3 жыл бұрын
Very good video. I learned something new!
@darrenfrancis8126
@darrenfrancis8126 2 жыл бұрын
excellent explanation, you answered all the questions I had about pointers with arrays and taught it perfectly for beginners! 👏
@jeetenzhurlollz8387
@jeetenzhurlollz8387 8 ай бұрын
easy to undesratnd excellent tutorial + the tutor is very very beautiful
@CodeBeauty
@CodeBeauty 8 ай бұрын
Thank you 🥰🥰
@StefanSchmalhaus
@StefanSchmalhaus 2 жыл бұрын
Could you please explain the line 'system("pause>0")'? I know what it does but I'd like to know more about the syntax. Thanks!
@CodeBeauty
@CodeBeauty 2 жыл бұрын
Sure, here is a video about that 😊 kzbin.info/www/bejne/jJSvfn97rJmmpJo
@StefanSchmalhaus
@StefanSchmalhaus 2 жыл бұрын
@@CodeBeauty Thank you very much!
@abdallaayman3156
@abdallaayman3156 4 жыл бұрын
I have exam tomorow you just saved me Arigato 🙏
@CodeBeauty
@CodeBeauty 4 жыл бұрын
Good luck! 🤗🥰
@wrushabhparkhi3141
@wrushabhparkhi3141 3 жыл бұрын
wonderfully explained
@fannartink9259
@fannartink9259 3 жыл бұрын
I understood perfectly 😊😊 thank you
@CodeBeauty
@CodeBeauty 3 жыл бұрын
🤗🥳🥰
@becomplextobesimple
@becomplextobesimple 4 жыл бұрын
Could you make a Stl tutorial ?It will be great!
@ViralVideos-nf1gl
@ViralVideos-nf1gl 2 жыл бұрын
mam we need full course of data structure and algorithms with C++ your method of explanation is very clear need this course very badly as soon as you can mam we all viewers will be very thankfull of you and i have already started this university but for me its not very helful so that why this course will help alot of students
@mishaluna4495
@mishaluna4495 2 жыл бұрын
Do you by chance have a video covering sorting and searching values through an array?
@MfaneloPMbele
@MfaneloPMbele 3 жыл бұрын
You are simply the best
@mohamedmuhsin7483
@mohamedmuhsin7483 3 жыл бұрын
how would I print those values from last element with index 4 to index 0
@hagarabdel_salam3516
@hagarabdel_salam3516 2 жыл бұрын
I love your explained too much keep going 🇪🇬
@prithiv6875
@prithiv6875 4 жыл бұрын
Awesome explanation :D
@YourNameHere1000
@YourNameHere1000 11 ай бұрын
What are you using that puts in all those spaces in the code? I really like that you can just keep typing.
@kaankosti1279
@kaankosti1279 4 жыл бұрын
ım so happy that i found you your code is gorgeous like you
@macusama9592
@macusama9592 3 жыл бұрын
Whoaa this sure will do a great job tomorrow in my exam lol. Awesome explanation!
@utpalkumar100
@utpalkumar100 Жыл бұрын
Great Video! I just have one confusion about the usage of the "system("pause>0");" at the end of the main function. Why is it being used as this is not a GUI application where the pause is important?
@DobbynciCode
@DobbynciCode 2 жыл бұрын
Dang. That one's a good explanation for pointers and references. One question, lists doesn't have element invocation using square brackets. Can we use *(array+integer) to traverse on it?
@nines7588
@nines7588 3 жыл бұрын
what an explanation mam! ❤️
@lucywaylen2400
@lucywaylen2400 2 жыл бұрын
how do you make the terminal pop up with visual studio code when you run the program?
@lolroco
@lolroco 4 жыл бұрын
gracias estaba en el borde de la locura
@kultureislame
@kultureislame 3 жыл бұрын
@codebeauty 0:52 how do you put space between characters like that? whats the keyboard combination please?
@luzten
@luzten 3 жыл бұрын
its the IDE doing it, you should avoid those type of practices, in fact, it's recommended to learn to code on a text editor such as Vim, mcedit etc when you are learning so you can learn the good habits from the start.
@kultureislame
@kultureislame 3 жыл бұрын
@@luzten programmers are lazy bro yk
@joborfrederick4312
@joborfrederick4312 2 жыл бұрын
Saldina please how do you make the program read the first index of an array as one? That’s if you are writing a program for inserting a value at a specified position in an array and you don’t want the output to be strange to the user.
@107vijayanand4
@107vijayanand4 3 жыл бұрын
Thank you so much.Its very useful and easy way to understand programing language. we want more languages videos like python full course
@bizneslupa3629
@bizneslupa3629 2 жыл бұрын
if someone just want to learn c# and web development does learning C++ will help him a lot ?
@chrisg.5507
@chrisg.5507 3 жыл бұрын
Do you have a video of removing blank spaces in a sentence
@ilyfisher8006
@ilyfisher8006 3 жыл бұрын
Subscribed! I would like to see more on arrays and c-strings
@CodeBeauty
@CodeBeauty 3 жыл бұрын
Hi 🤗 Check out my Data structures playlist. I have a video related to arrays there 😊😊
@kushal6065
@kushal6065 3 жыл бұрын
@@CodeBeauty SImp
@onurolce
@onurolce 4 жыл бұрын
a nice video tutorial again, thanks :) But please keep going to make videos about pointers more such as how to pass it to function as a parameter, how to create char pointers.
@CodeBeauty
@CodeBeauty 4 жыл бұрын
I already have filmed videos related to some of those topics. I just haven't edited 'em yet. 😊
@onurolce
@onurolce 4 жыл бұрын
@@CodeBeauty very cool, so we are going to watch them soon :) I don't know how much effort do you spend for edit videos but you look expert to teach us these topics :)
@rejhanpuskar
@rejhanpuskar 4 жыл бұрын
Do you also do paid training for C++ beginners?
@CodeBeauty
@CodeBeauty 4 жыл бұрын
I used to work as a programming instructor on paid courses in my free time, but I don't have enough time now, so I don't do it anymore. 😊
@parttimedude5440
@parttimedude5440 4 жыл бұрын
Thank You so much
@Programming_Buddy1
@Programming_Buddy1 2 жыл бұрын
Love your videos! I actually understand what is going on! lol
@PunkUntilThe3nd
@PunkUntilThe3nd 3 жыл бұрын
Just out of curiosity: Is there any reason to use those clumsy, uneasy and non-canonical C-Arrays over std::array and std::vector? Most of the discussed problems in size-assertions, usage in range-based-loops and most importantly conversion from T[ ] to T* in return statements are solved for about a decade. In all other regards a very good video, just append the reference to std::array in a prominent place if possible.
@joborfrederick4312
@joborfrederick4312 2 жыл бұрын
Please what IDE were you using here?
@jerryzhuo3394
@jerryzhuo3394 4 жыл бұрын
Help a lot, thank u!!
@menu6750
@menu6750 3 жыл бұрын
Hi..what is the meaning of👇 system("pause>0"); return 0;
@michelchaghoury9629
@michelchaghoury9629 2 жыл бұрын
@CodeBeauty Please keep going, learning a lot, this is really the best channel when it comes to learn C++, kindly can you plase in the future make tutorials about CMake and Unit Testing in C++?
@natetolbert3671
@natetolbert3671 3 жыл бұрын
So what is the _point_ of using the ampersand, if you can access the address without it? Or is that just for arrays?
@natetolbert3671
@natetolbert3671 3 жыл бұрын
nevermind, I got it.
@526sunny6
@526sunny6 2 жыл бұрын
thanks for helping me
@devendrakoli7014
@devendrakoli7014 3 жыл бұрын
Thank you mam this is very helpful for me 👍🥰
@JD-eb5qu
@JD-eb5qu 2 жыл бұрын
Great explain
@tsukoyome
@tsukoyome 3 жыл бұрын
I love you so much
@sing759
@sing759 4 жыл бұрын
thanks for the video
@nedaa8829
@nedaa8829 2 жыл бұрын
5:19 what is the short cut to comment all the lines at once?! O.O
@jarretskinner1392
@jarretskinner1392 2 жыл бұрын
ctrl+k and then ctrl+c. to uncomment the selection press ctrl+k then ctrl+u
@vindyadhariishadhara9952
@vindyadhariishadhara9952 3 жыл бұрын
A nice lecture.
@eduard289
@eduard289 3 жыл бұрын
Thank you a lot .. just thanks
@rajk9989
@rajk9989 4 жыл бұрын
Thanks for this video! Can you do videos on vectors too?
@vk2ig
@vk2ig 4 жыл бұрын
The luckyNumbers[5] array is a vector, as it has only one dimension.
@abuzharrluqman9304
@abuzharrluqman9304 4 жыл бұрын
ok your earned my sub
@manjeet_rajput_95188
@manjeet_rajput_95188 15 күн бұрын
why are you always using system pause line in the end of the code
@CodeBeauty
@CodeBeauty 14 күн бұрын
Hey, there is a video about that on my channel. Just search for "system pause codebeauty" and you can watch the explanation with examples 😃
@rezamehrzad5128
@rezamehrzad5128 3 жыл бұрын
she is catching up to Bucky! Great video tho!!
@animatedzombie64
@animatedzombie64 4 жыл бұрын
i already know c++, i'm only here to video.like++ && video.views++; love you!
@CodeBeauty
@CodeBeauty 4 жыл бұрын
Thanks so much! 🥰
@tennysonchakona6270
@tennysonchakona6270 Жыл бұрын
Are there any videos for arrays 😪
@youssefreda4741
@youssefreda4741 3 жыл бұрын
very understandable
@ParadoxWorks
@ParadoxWorks 4 жыл бұрын
Hi Saldina! Will you be covering more advanced stuff like data structure & algorithms in future? Pozdrav iz Hrvatske!
@CodeBeauty
@CodeBeauty 4 жыл бұрын
That is the plan 😉 Veliki pozdrav iz Mostara! 🇭🇷🥰
@becomplextobesimple
@becomplextobesimple 4 жыл бұрын
Hey pozdrav means congratulations in English?
@ParadoxWorks
@ParadoxWorks 4 жыл бұрын
@@becomplextobesimple Hej and pozdrav are synonyms and mean hi or hello
@michelange5102
@michelange5102 4 жыл бұрын
Wow!
@alyaqistina597
@alyaqistina597 11 ай бұрын
thankyouuuuuuuuuu😭
@dealvin
@dealvin 3 жыл бұрын
is succesfull code : char arr[] = {'a','b','c','d','e'}; for(char* pointer = arr; *pointer != arr[4]; pointer++){ cout
@subee128
@subee128 2 жыл бұрын
Thanks
@jasnarmstrng
@jasnarmstrng Жыл бұрын
~5 "differentiates" 😉 For beginners - favour vector over array.
@billuchoudhary4436
@billuchoudhary4436 3 жыл бұрын
Thank you mam🙏
@smpbih
@smpbih 4 жыл бұрын
Jel mogu privatni časovi kod tebe
@rejhanpuskar
@rejhanpuskar 4 жыл бұрын
+1
@Rain-ml6td
@Rain-ml6td 4 жыл бұрын
Can you make a toturial about ploting a curve? Like Develop a program that plots the curve y = 4x3 - x4; for x from -10 to 10 in an increment of 0.5. I really need to know it, nextweek is our finals.
@Sisa095
@Sisa095 2 жыл бұрын
This isn't working for me, instead of outputting the numbers there are adresses outputted
@day4834
@day4834 2 жыл бұрын
Hi, try to compare your output code with mine for (int i = 0; i
@Sisa095
@Sisa095 2 жыл бұрын
​@@day4834 Hi, thank you for your response:) I don't know where the problem is but I did it the way it is shown in the video and it just doesn't work. I'm putting in two values (it doesn't work with one value either) as it is a 3x3 Matrix but no success (I want to compute the determinant). Unfortunately I can't really post my code here as it is for a HW and my professors check for plagiarism.
@day4834
@day4834 2 жыл бұрын
@@Sisa095 Hi simonay, understood. Sorry I can't help here, this seems to be the Laplace Expansions for the Determinant which I'm not particularly good at.
@Sisa095
@Sisa095 2 жыл бұрын
@@day4834 Thank you nonetheless:)
@FLARE080
@FLARE080 2 жыл бұрын
This was for beginners?
@petersam5300
@petersam5300 2 жыл бұрын
Good
@han_na2526
@han_na2526 4 жыл бұрын
Thanks very much for your video! Explanation was easy and useful to understand. Subscribe ++
@CodeBeauty
@CodeBeauty 4 жыл бұрын
Welcome Anna! 🤗💗
@hell0kitje
@hell0kitje 4 жыл бұрын
Ave Saldina
@sanderschristian3129
@sanderschristian3129 3 жыл бұрын
will somebody give her a clap *clap**clap**clap**clap*
Арыстанның айқасы, Тәуіржанның шайқасы!
25:51
QosLike / ҚосЛайк / Косылайық
Рет қаралды 700 М.
Support each other🤝
00:31
ISSEI / いっせい
Рет қаралды 81 МЛН
you will never ask about pointers again after watching this video
8:03
SMART POINTERS in C++ (for beginners in 20 minutes)
24:32
CodeBeauty
Рет қаралды 106 М.
The Dome Paradox: A Loophole in Newton's Laws
22:59
Up and Atom
Рет қаралды 785 М.
What is mathematical thinking actually like?
9:44
Benjamin Keep, PhD, JD
Рет қаралды 10 М.
Арыстанның айқасы, Тәуіржанның шайқасы!
25:51
QosLike / ҚосЛайк / Косылайық
Рет қаралды 700 М.