C++ POINTERS (2025) - How to create/change arrays at runtime? (Dynamic arrays) PROGRAMMING TUTORIAL

  Рет қаралды 161,342

CodeBeauty

CodeBeauty

Күн бұрын

Пікірлер: 285
@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.
@DanTon-v7o
@DanTon-v7o Жыл бұрын
Thank you so much for your lecture. It's very good and it helps me alot. I have a question regarding to deallocate memory: What if we don't call delete[]myArray but just only call myArray = NULL; ? Can you explain what will happen?
@uccoskun
@uccoskun Жыл бұрын
You are a very good teacher. you specify the problem, explain it, and then finally solve it for us.
@tep-gn4rk
@tep-gn4rk 3 жыл бұрын
Thank you! I was so frustrated by my dynamic arrays assignment in class, I spent hours trying to get it to work. This helped clear things up! :)
@CodeBeauty
@CodeBeauty 3 жыл бұрын
🤞🥰🥰
@robertocarriero
@robertocarriero 3 жыл бұрын
I do love your pronunciation! For a non native english speaker (like me), it is very easy to understand you :-)
@CodeBeauty
@CodeBeauty 3 жыл бұрын
🤗🥰🥰
@jahitrst2863
@jahitrst2863 4 жыл бұрын
Aight. Finally something good on KZbin
@CodeBeauty
@CodeBeauty 4 жыл бұрын
🤞🥰
@vrietywastaken
@vrietywastaken 3 жыл бұрын
Bro this woman is singlehandedly carrying me through my course
@snazzym00se
@snazzym00se 3 жыл бұрын
This was way more helpful than my lecture videos for class. Thank you
@ananavarro160
@ananavarro160 13 күн бұрын
I've been looking at your videos (from arrays and loops), and I just want to say thank you so much. You always help me understand. I looked at prior videos on said topics, and it's always guys who think I know more than I do, your tutorials are for ACTUAL beginners, which I appreciate, and you explain things so well and the WHY too. There are not as many women in STEM, so it’s encouraging when I see another woman’s programming! Once again, I just want to say you’re an amazing teacher and thank you so much for putting this content out!
@srivathsgondi191
@srivathsgondi191 3 жыл бұрын
i have followed so many coding channels, yet this remains as one of the best for me.
@czaratech7216
@czaratech7216 2 жыл бұрын
I love how you explain things going on in memory!
@sinodasidiatof5465
@sinodasidiatof5465 3 жыл бұрын
Of all online tutorials, you are the best! Not only in C++. You must teach in universities. Charismatic!
@careenwasonga
@careenwasonga Жыл бұрын
I have been binge watching your videos and must I say, THIS ONE RIGHT HERE!!! It made everything make perfect sense.
@CodeBeauty
@CodeBeauty Жыл бұрын
❤️🚀✨️
@mohtdips277
@mohtdips277 4 жыл бұрын
I am very happy when I see you .. I love your lessons very much, although I suffer from an understanding of the English language, but I somehow benefit ... My love for you and I wish you success and excellence .. from Palestine
@CodeBeauty
@CodeBeauty 4 жыл бұрын
Thank you so much! 🇵🇸🥰
@jeloi9364
@jeloi9364 4 жыл бұрын
amazing explanation Saldina!!! TOP! are you planning to make a smart pointers video soon??
@CodeBeauty
@CodeBeauty 4 жыл бұрын
Yes 😊
@michaelmorrow12
@michaelmorrow12 2 жыл бұрын
Love your videos! Currently in my last year for my bachelors and have this crazy 7 hour long test at the end of the semester where 1/4 of it tests my c++ knowledge. If I get anything less than a 70 on the test I auto fail no matter what I have on anything else turned in during the semester. Reviewing c++ with your tutorials is seriously boosting my confidence! thank you..
@shaquilleoatmeal6588
@shaquilleoatmeal6588 2 жыл бұрын
7 hours ? which country are you from bro?
@mariacunha8508
@mariacunha8508 2 жыл бұрын
how was your test, sir? also, 7 hours? how do you survive?
@sonido9519
@sonido9519 Жыл бұрын
what did you get? what are you doing now?
@k2305Pawan
@k2305Pawan 3 ай бұрын
which uni, sounds crazy lol
@tellator
@tellator 3 жыл бұрын
Thank you for your videos. It is much easier for people who are not native English to perceive your speech than other bloggers
@zombiehellmonkeygaming1956
@zombiehellmonkeygaming1956 4 жыл бұрын
Thank you for the tutorial, it cleared many things up for me. Do you think you could expand on this lesson to explain creating dynamic multi-dimensional arrays at runtime?
@CodeBeauty
@CodeBeauty 4 жыл бұрын
I plan to do multidimensional as well 😊
@MacysShopLifter
@MacysShopLifter 3 жыл бұрын
Thanks! Really great video. You explained everything perfectly and with great detail. Had no fluff and was quick.
@nitinchinmay260
@nitinchinmay260 2 жыл бұрын
I am not getting an error when I write what you wrote till 4:59 😐😐😐😐😐😐😐😐😐😐
@bintangyustra
@bintangyustra 2 жыл бұрын
thank you so much, this video help me alot to finish my school assignment
@kolbe6436
@kolbe6436 2 жыл бұрын
I didn't quite understand this topic when it was taught at school so I am glad that you explained it well here and I was able to understand it. Thank you.
@kolbe6436
@kolbe6436 Жыл бұрын
@Feev6r Yes, it is.
@kolbe6436
@kolbe6436 Жыл бұрын
@Feev6r But it depends on the school you attend.
@snehadey883
@snehadey883 10 ай бұрын
Why didn't I find your channel earlier?😩 You explained it very well I understood this topic within seconds ❤
@normalperson1130
@normalperson1130 3 жыл бұрын
Thank you code beauty. Your way of teaching is really helpful in understanding these c++ topics. Now I feel more confident. Thank you very much.
@baconsledge
@baconsledge 3 жыл бұрын
Very helpful and professional tutorials!
@moizsultan5440
@moizsultan5440 4 жыл бұрын
Just subbed you today after watching 5 of your vids thanks for putting effort
@CodeBeauty
@CodeBeauty 4 жыл бұрын
Welcome! 🤗🥰
@alonalon8794
@alonalon8794 2 жыл бұрын
I dont get an error when I run the code in 4:27. why is that?
@smDonttakemeseriously
@smDonttakemeseriously 3 жыл бұрын
From giving up coding to understanding it all. Your channel is amazing .Thank you so much . I promise to buy you coffee with my first salary :)
@captainven0m38
@captainven0m38 3 жыл бұрын
Well I am totally in love with your way of teaching c++ stuff and specifically I love this tutorial.
@dubiousend9429
@dubiousend9429 3 жыл бұрын
simple and easy to follow, love it !
@v037_
@v037_ Жыл бұрын
simp
@PeacefulMusic-l7o
@PeacefulMusic-l7o Жыл бұрын
It was reeeaallyyy helpful, I can't say how much this video means to me. Thanks!!!
@eliaspianomusic
@eliaspianomusic 3 жыл бұрын
Highly appreciate the videos! Thanks for your effort! Greatly explained!
@bara7979
@bara7979 2 жыл бұрын
First and foremost, thank you for all of these fantastic tutorials. We would appreciate it if you could use the dark mode for future tutorials.
@CodeBeauty
@CodeBeauty 2 жыл бұрын
Thanks. I did that already for later videos 😊
@AnuragYadav-cp9jh
@AnuragYadav-cp9jh 3 жыл бұрын
I was frustrated but now i finally found how to declare and enter value in dynamic array thank you.
@Utkarsh.Raj.129
@Utkarsh.Raj.129 3 жыл бұрын
At 4:32, I don't get the problem by taking input of size different everytime...why would it be an error...I'm not getting error..pls look onto this
@Srimudit
@Srimudit 3 жыл бұрын
You are a very good teacher. Please continue making videos on C++. PLease make videos on Data structures using C++.
@itsme17717
@itsme17717 Жыл бұрын
I just find your channel and you save my lots of time🥰🥰🥰
@CodeBeauty
@CodeBeauty Жыл бұрын
🚀🚀✨️
@bassets2450
@bassets2450 4 жыл бұрын
Great job! Keep it up! Also, I wanted to ask you if you're gonna do some GUI tutorials in C++... Your explanations are a golden mine... Don't keep them only for yourself! 😉
@mashalmokarar4817
@mashalmokarar4817 2 жыл бұрын
Ms saldina by far your the best:))))
@TheWierdVibe
@TheWierdVibe 2 жыл бұрын
I have been trying to swap the elements of a dynamically allocated array but the program behaves wierdly of an array which is declared at runtime?
@georgebentley-ricardo9445
@georgebentley-ricardo9445 2 жыл бұрын
Thanks for sharing another great lesson, a video for algorithms would be great too. Many thanks 🤓👍
@erikchen6883
@erikchen6883 3 жыл бұрын
Thank you so much for this video! You are so knowledgeable and can explain better than a college professor.
@corradosteri9150
@corradosteri9150 2 жыл бұрын
I do not get an error if i don't specify array dimension before compiling, running it and cout sizeof gets the right dimension.
@theboy776
@theboy776 Жыл бұрын
Yes this girl explains really good. 😊
@sogan754
@sogan754 4 ай бұрын
What I like about those videos is that they are detailed, and if I'm not mistaken, you're using the official cppreference documentation, and that is good because I recognize things from our Professor's lecture. He also uses that site as a source, which makes what is thought detailed and enough, despite most videos that talk about the concepts shortly.
@metaman8662
@metaman8662 3 жыл бұрын
This is enlightening thank you!
@Spaghettaboutit
@Spaghettaboutit 2 жыл бұрын
Thanks for this video, I needed it as a refresher/maybe I never learned this(?) - anyhow thanks for making a concise explanation that didn't get long winded.
@mashalmokarar4817
@mashalmokarar4817 2 жыл бұрын
I cant say thank you enough👏👏
@SpaceSurferGod
@SpaceSurferGod 2 жыл бұрын
Really nice explanation, thank you!
@codevanguard
@codevanguard Жыл бұрын
great practice on de-allocate
@emmapha4593
@emmapha4593 2 жыл бұрын
Thank you so much for such amazing videos. I hope you could do videos about “sort” and “iterator”. Thank you
@MacysShopLifter
@MacysShopLifter 3 жыл бұрын
At 5:36 how did you add // quickly to comment that out?
@رضوانناجي-ن5ص
@رضوانناجي-ن5ص 7 ай бұрын
Amazing your explanation
@vojtechkozak3328
@vojtechkozak3328 4 жыл бұрын
Will you do video about std::make_unique and std::make_shared?
@Abbas-xd1mc
@Abbas-xd1mc 4 жыл бұрын
Best explanation! Much appreciated.
@suyash835
@suyash835 Жыл бұрын
#include using namespace std; int main(){ int size; cin >> size; int arr[size]; system("pause>0"); // return 0; } So here's was my code and this got me *no errors*, maybe its because of the new versions of C++ but doesn't it oppose the whole concept of dynamic array?
@mrengineer26
@mrengineer26 Жыл бұрын
I was about to comment the same thing. I had to get up and check again why I didn’t get error. @codebeauty can you please explain? Thanks
@rishabhsingh-gw3gf
@rishabhsingh-gw3gf 2 жыл бұрын
Thank you so so much.... finally understood all my doubts are clear...thank you so much for explaining this in so simple way...👍👍👍😃😃❤️❤️
@datmapmap7942
@datmapmap7942 3 жыл бұрын
Thanks for your video. Hoping that you will make a video about linked list someday !
@CodeBeauty
@CodeBeauty 3 жыл бұрын
kzbin.info/www/bejne/fnzJm2OibNOXmMU 🤗🤗
@gisellegonzalez431
@gisellegonzalez431 3 жыл бұрын
I love your channel!
@robertod893
@robertod893 2 жыл бұрын
Excellent video!
@Ashishkumar-mj4dh
@Ashishkumar-mj4dh 3 жыл бұрын
this video cleared my concept
@valentineobinikpo5375
@valentineobinikpo5375 3 жыл бұрын
Thank you, I finally understand DMA in C++..
@songhye742
@songhye742 Жыл бұрын
Your teach very cleared I love you 😘
@iamabdulsami
@iamabdulsami 3 жыл бұрын
Thanks a lot for clearing my concepts
@music1.060
@music1.060 8 ай бұрын
beautiful teacher and fun programming is best
@dayla8434
@dayla8434 11 ай бұрын
How can someone be that perfect in teaching ! U're so beautiful ilu ❤
@CodeBeauty
@CodeBeauty 11 ай бұрын
Thank you so much and I'm happy that my videos help you! ❤️🥰
@prokumar7239
@prokumar7239 2 жыл бұрын
Question: When I try running the example at 4:31, I do not get the error that the expression must have constant value. The program compiles and runs. After some research I found it may have to do with the compiler language standard, I believe my computer defaults to C99. I was wondering if you had any thoughts on this. I am having some trouble setting the proper language standard. Note: I am using terminal commands to compile (g++ ... ) and run (./my_program) Do programmers usually set a standard before starting a project?
@alecmatthews9611
@alecmatthews9611 2 жыл бұрын
Same bro! I tried doing the example at that timestamp and it works just fine. I didn't even have to do the dynamic allocation thing. Any idea yet why this works?
@shakilmosharrof_1994
@shakilmosharrof_1994 3 жыл бұрын
Please make videos on Data structures and algorithms in c++
@CodeBeauty
@CodeBeauty 3 жыл бұрын
I already have some video about data structures ☺
@juangaldo2892
@juangaldo2892 3 жыл бұрын
I love you, sorry and thank you for all!! I'm learning a lot!
@gds1233
@gds1233 2 жыл бұрын
came here from freecodecamp video. loving your content
@realestateETH
@realestateETH 2 жыл бұрын
Thank you vary much sa for all your video 🙏🙏🙏
@ArpitKumar-yo6up
@ArpitKumar-yo6up 3 жыл бұрын
Thank you for the explanation
@FunComputerScience
@FunComputerScience Жыл бұрын
nice video, helped me lot!
@ahabdelaal
@ahabdelaal 3 жыл бұрын
Thank you . appreciate your effort .
@spicyshizz2850
@spicyshizz2850 2 жыл бұрын
9:55 I thought that when we did "new" the array changes from fixed where it was originally one after each other and that's why "myArray+I" would work. But doesn't new make the addresses not continuously right after each other? So why does it work with new?
@Javagenusk87
@Javagenusk87 2 жыл бұрын
Interesting well explained this was very helpful thank you.
@MarošDočekal
@MarošDočekal 11 ай бұрын
Hi, thanks for video. I have question if it is better to use nullptr compare to NULL ?
@CodeBeauty
@CodeBeauty 11 ай бұрын
It is better to use nullptr 😃
@shaladddin5687
@shaladddin5687 3 жыл бұрын
Thank you so much, the explanation is really satisfying that's all I can say 😄
@__matthi
@__matthi 4 жыл бұрын
Great explanation! Thanks :)
@safiullah34511
@safiullah34511 Жыл бұрын
4:15 It works on my IDE but you said that it shows error ... The size of array can be specified at runtime
@rmv9064
@rmv9064 Жыл бұрын
Thank you SO MUCH.
@aykut8517
@aykut8517 4 жыл бұрын
thanks for upload ,really helpfull
@chanchaltiwari648
@chanchaltiwari648 3 жыл бұрын
please make a video on vectors.
@inspirewithakb773
@inspirewithakb773 3 жыл бұрын
which theme you are using?
@btait1365
@btait1365 2 жыл бұрын
omg thank you thank you thank you!!!!!!
@prajwalv2222
@prajwalv2222 3 жыл бұрын
can you make videos regarding to STL in C++?
@atharvagarwal6412
@atharvagarwal6412 Жыл бұрын
Is it weird that when I run the code at 4:12 on g++ 13.0.1, I get no errors?
@CodeBeauty
@CodeBeauty Жыл бұрын
If it's not broken, don't fix it 😁
@legolas5684
@legolas5684 4 жыл бұрын
Great job!
@vaughnmonkey
@vaughnmonkey 3 жыл бұрын
very helpful thank you
@saravanakumar.a
@saravanakumar.a Жыл бұрын
Thank you sister😌
@Scrawlerism
@Scrawlerism 3 жыл бұрын
Omg a good dynamic array deallocation explanation thank youuuuuu
@CodeBeauty
@CodeBeauty 3 жыл бұрын
🤗🤗😊
@khalidessamoudi2291
@khalidessamoudi2291 3 жыл бұрын
Really beauty coding
@arpnasjs9825
@arpnasjs9825 2 жыл бұрын
Thank u😊
@BKYADAV-zm7yv
@BKYADAV-zm7yv 2 жыл бұрын
Nice explanation mam thank you so much
@seetllee
@seetllee 2 жыл бұрын
Hi Saldina! One question: How do you get VSCode to read your code before you compile, and show you possible errors, like it did in 4:26?
@gamefreak6126
@gamefreak6126 Жыл бұрын
That’s not VScode
@sergio_sciuto_conti
@sergio_sciuto_conti 3 жыл бұрын
Can I know what camera do you use to record? Is it a webcam or something else?
@CodeBeauty
@CodeBeauty 3 жыл бұрын
It is my mobile phone cam. Is it okay? 😃😃
@sergio_sciuto_conti
@sergio_sciuto_conti 3 жыл бұрын
@@CodeBeauty It is fantastic, you're using the front or the rear camera? :)
@farichzineb6162
@farichzineb6162 Жыл бұрын
4:31 i dont get any error when i try this the program was running just fine with me and i made the user fill the array with the size they put please help i dont understand where the problem is
@mmaranta785
@mmaranta785 3 жыл бұрын
Thanks. I learned something.
@cpprogramming2471
@cpprogramming2471 4 жыл бұрын
int size; coutsize; int array[size]; doing it like this does not give any errors to me. can someone explain.
@AangContreras
@AangContreras 3 жыл бұрын
Same here. I'm not sure why x.x
@yasua7000
@yasua7000 3 жыл бұрын
Variable length arrays (VLAs) are allowed in C99 and many C++ choose to accept them as well. Try compiling it with stricter warning options and you should see something like "warning: variable length array is used [-Wvla]"
@yashjadhav6838
@yashjadhav6838 3 жыл бұрын
same
@toastyren3991
@toastyren3991 3 жыл бұрын
Very interesting video, you're amazing Saldina ;-) Thank you very much for the time you spend making those videos ;-)
@CollegeTubeBrw
@CollegeTubeBrw 3 жыл бұрын
Please make a video on vectors as well
@ritikarai1232
@ritikarai1232 3 жыл бұрын
Thank u Saldina!!!!!!!
@CodeBeauty
@CodeBeauty 3 жыл бұрын
You're welcome! 🤗🤗
SMART POINTERS in C++ (for beginners in 20 minutes)
24:32
CodeBeauty
Рет қаралды 108 М.
Хаги Ваги говорит разными голосами
0:22
Фани Хани
Рет қаралды 2,2 МЛН
Pointers and dynamic memory - stack vs heap
17:26
mycodeschool
Рет қаралды 1,5 МЛН
Dynamic Arrays in C++ (std::vector)
14:14
The Cherno
Рет қаралды 389 М.
new & delete Operators For Dynamic Memory Allocation | C++ Tutorial
15:52
Portfolio Courses
Рет қаралды 35 М.
Dynamic Memory Allocation -- C++ Pointers Tutorial [8]
18:25
Professor Hank Stalica
Рет қаралды 30 М.
31 nooby C++ habits you need to ditch
16:18
mCoding
Рет қаралды 852 М.
7 Outside The Box Puzzles
12:16
MindYourDecisions
Рет қаралды 457 М.
ARRAYLIST VS LINKEDLIST
21:20
Core Dumped
Рет қаралды 88 М.