C++ Pass by Value, Reference, Pointer Explained

Поділитися
Вставка
  • Опубліковано 23 сер 2024

КОМЕНТАРІ • 31

  • @CubedAgency
    @CubedAgency 2 роки тому +27

    DUDE FINALLY IT CLICKED IN MY HEAD! I've watched so many videos trying to understand why pointers are useful over just sending the variable itself to a function and what's the heck is the difference b/t pointers and references. I didn't realize I was creating duplicate data every time! Thanks for making these vids to clear this up in an easy to understand way!

  • @Ccorniit
    @Ccorniit 8 місяців тому +2

    Thank you Caleb. I wish I found your channel earlier. You make it so easy to understand! You’re the best.

  • @scottsturdevant9903
    @scottsturdevant9903 3 роки тому +5

    Sooooooo ready for this series, been wating ever since you talked about this at end of last c++ series! This is amazing you're doing it!!

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

    7:48 perfect opportunity for a joke about pass by reference, title needed to get updated haha

  • @kjvisual7
    @kjvisual7 3 роки тому +12

    I just watched your videos about reference and pointers. Wow! Thanks. I am taking course but these basics were not explained well and I was confused with how the syntax worked. You made this all super easy to understand.
    Question, what do you think is a good naming convention for a reference? I kinda like the underscore.

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

      I know I wasn't asked but I usually use "_" as well. Since whitespaces aren't allowed in variables/references etc when naming them, the use of "_ " allows me to seperate names that are made with more than one word. For example: int userPassword is not as clear as int user_Password. I also capitalize every other word following underscores.

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

    Vos explications sont simples, mais géniales! C'est clair, clair....

  • @ConservativeHippie001
    @ConservativeHippie001 3 роки тому +3

    I love your channel! THANK YOU!!

  • @gustavo-rios
    @gustavo-rios Рік тому

    Liked and commented for the youtube algorithm. This is a great video, keep it up, Caleb!

  • @fairuzbintealam4064
    @fairuzbintealam4064 Рік тому +1

    As always, thank you loads for the simple explanation.

  • @timothyashton4703
    @timothyashton4703 3 місяці тому

    Great work, Caleb. Thanks.

  • @SirenSeph
    @SirenSeph Місяць тому

    thx soo much for this explanation

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

    You are best teacher I ever had

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

    7:08 you talking to me?? Yeah you damn right lol

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

    Hi Caleb
    Thank you for the well explained video

  • @MrKiar1611
    @MrKiar1611 11 місяців тому

    Thank god, other videos keep talking pass by reference while doing pass by pointer.
    while I read some real pass by reference functions in some docs and got confused for years!

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

    So funny! You are awesome... you make it very easy to digest and teach it like a friend, not a perfectionist.

  • @davidfarah
    @davidfarah 3 роки тому

    Thanks for your vids!

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

    Caleb, in the pass by value example how does int a know to become int x? I don't see anything that tells the code to replace x with a or vice-versa. Can you help me understand how that works?

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

    thank you!

  • @bekim137
    @bekim137 Місяць тому

    Thank

  • @DonaldMurf
    @DonaldMurf 3 роки тому +3

    I wish my G.I bill money could go towards you and not half of my professors who can barley use a computer and makes a teachers assistant do all the grading.

  • @vatsal3623
    @vatsal3623 3 роки тому

    Thanks bro 🙌

  • @everline_builders
    @everline_builders 3 роки тому

    Hey Celeb, great video! You mentioned data can be changed without knowing when passed to a function, can we assign the data as a const to avoid these unknown changes? Thanks.

  • @Retnuh1974
    @Retnuh1974 3 роки тому

    Love your videos, but do people really pay $1500 for an IDE? Now I have purchased several IDE's but these are like $99 a year or $150 Lifetime.

  • @nookalareshwanth1785
    @nookalareshwanth1785 11 місяців тому

    editor savagek🤣🤣

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

    First

  • @sams_3d_stuff
    @sams_3d_stuff 3 роки тому

    love you man, no homo.

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

    goodboy😂

  • @skypuff
    @skypuff 3 роки тому

    Second