C++ Programming Tutorial 47 - Passing Arrays to Functions and sizeof Operator

Поділитися
Вставка
  • Опубліковано 14 гру 2024
  • Start your software dev career - calcur.tech/de... 💯 FREE Courses (100+ hours) - calcur.tech/al...
    🐍 Python Course - calcur.tech/py...
    ✅ Data Structures & Algorithms - calcur.tech/ds...
    ~~~~~~~~~~~~~~~ CONNECT ~~~~~~~~~~~~~~~
    ✉️ Newsletter - calcur.tech/ne...
    📸 Instagram - / calebcurry
    🐦 Twitter - / calebcurry
    🔗 LinkedIn - / calebcurry
    ▶️ Subscribe - calcur.tech/sub...
    👨🏻‍🎓 Courses - www.codebreakt...
    ~~~~~~~~~~~~~~ SUPPORT ME ~~~~~~~~~~~~~~
    ↪ My Amazon Store - www.amazon.com...
    🅿 Patreon - calcur.tech/pat...
    🅖 GitHub Sponsors - github.com/spo...
    Ⓟ Paypal - paypal.me/calcur
    🅑 Bitcoin - 3HnF1SWTzo1dCU7RwFLhgk7SYiVfV37Pbq
    🅔 Eth - 0x350139af84b60d075a3a0379716040b63f6D3853
    📈 Buy Bitcoin - calcur.tech/cr...
    Reserve the Ruby Steel crypto rewards card and get a $25 bonus (use affiliate code "Caleb") - calcur.tech/cr...

КОМЕНТАРІ •

  • @aojiao2823
    @aojiao2823 5 років тому +16

    Is there a way to not pass the size of the array but somehow the function still knows when it reaches the end of the array? I'm doing a hw question on recursion and the function's parameter doesn't include the size of the array get passed to the function....

  • @igcmjoeabar8475
    @igcmjoeabar8475 4 роки тому +5

    I have a c++ job interview tomorrow. I’m completely new to it. Don’t lie on your resume folks

  • @kurtcobain254life
    @kurtcobain254life 3 роки тому +6

    Great video, saved me from smashing my head into the computer after getting some whacky output.

  • @PunmasterSTP
    @PunmasterSTP 3 роки тому +1

    It’s not the sizeof the tutorials in the playlist, it’s the fact that Embarcadero has helped over three million…wait what was I saying again?

  • @ishaan600
    @ishaan600 4 роки тому +3

    thanks man, this really helped me a lot since i'm new to c++. I also subbed

    • @ishaan600
      @ishaan600 3 роки тому +1

      @Everett Quentin are you on the fbi's most wanted list?

  • @amiliarek7521
    @amiliarek7521 2 роки тому +1

    this is so helpful! i'm just starting out! thank you!

  • @mohnd92
    @mohnd92 2 роки тому +1

    rad studio comparison visual studio ??

  • @DzahierulAliemy
    @DzahierulAliemy 4 роки тому +2

    Thank you very much sir.

  • @alancx523
    @alancx523 4 роки тому +2

    The pointer size at around 4 mins.... I got 4, not 8. Any reason? 32 bit v 64 bit?

    • @HaydenCornerOfKnowledge
      @HaydenCornerOfKnowledge 4 роки тому +1

      got a 4 also for the pointer.

    • @techhackz2897
      @techhackz2897 4 роки тому +1

      because ur using a 32bit compiler ur getting 4 bytes
      he is using a 64bit so its gonna be 8 bytes for pointer

  • @TheFinalCutBG
    @TheFinalCutBG 4 роки тому +7

    You forgot to change 5 to size, so what you are doing in the end is not exporting the size of the array to the void function, but just a random number of 5.

    • @codebreakthrough
      @codebreakthrough  4 роки тому +5

      Hristo Konstantinov lol yes we should be passing size in as argument. Still worked in this case, but could break if not changed. Thanks.

    • @TheFinalCutBG
      @TheFinalCutBG 4 роки тому +3

      Np. I'm coding for a first time in my life (we don't count High School), and you are my first teacher in this field, so thank you very much for these videos. Your way of teaching is methodical and absolutely perfect!

    • @codebreakthrough
      @codebreakthrough  4 роки тому +6

      Hey I really appreciate that. ✅

    • @SterlingNesbitt
      @SterlingNesbitt 4 роки тому +2

      good find! I spotted it too. I lot of programmers refer to it as a "hard coded constant". It's not adaptable and will break if we change the actual array as Caleb mentioned.

    • @slimstrait780
      @slimstrait780 3 роки тому +1

      @@SterlingNesbitt Yup. But sometimes, hardcoding is the only way to success.

  • @sylvesteruchia5263
    @sylvesteruchia5263 Рік тому

    I dont wanna be a hater , but it was never mentioned that you have to have the size of the array determined beforehand and you cannot have a userdefined size (you cant have an array set to be the size of a variable ,even if the variable has an assigned value ).

  • @slumz12
    @slumz12 2 роки тому

    Is this beginner's tutorial?

  • @steinstein-y3c
    @steinstein-y3c Рік тому

    c style strings decay too

  • @Timo-Epis
    @Timo-Epis Рік тому

    Like bodybuilders going on juice, they never know how big they are. They will keep saying "I'm small"

  • @gokulnaathb2627
    @gokulnaathb2627 3 роки тому +2

    Very nice, thank you so much, Sir

  • @guillebailes760
    @guillebailes760 4 роки тому +4

    It will be a great ++ if you post your final code here for us to copy. We are newbiz and coding errors is our nature. Other channel that I followed are kind to post their final working code :)) ……. Thanks a keep up the good work. Thanks again

  • @Vizzarii
    @Vizzarii 2 роки тому

    using namespace std;
    pleaseeeeeeee

  • @guitarhax7412
    @guitarhax7412 5 років тому +3

    #boom