Working with References in C++

Sdílet
Vložit

Komentáře • 36

  • @unrealdevop
    @unrealdevop Před rokem +2

    I searched all over for a good explanation of references and pointers and nobody came close to explaining them as clearly as you do. Thanks for the video.

  • @ddimwhite4638
    @ddimwhite4638 Před 3 lety +6

    Восхитительно! Талантливый человек.

  • @thelanavishnuorchestra

    Haven't written in C or C++ in 30 years, and suddenly I found something I wanted to do that required C++. So, your lighthearted and straightforward tutorials are a godsend.

  • @bigfutz
    @bigfutz Před 3 lety +4

    You deserve so many more views

  • @severgun
    @severgun Před 3 lety +1

    I think you should mention that pass by value will not only consume memory, but also copy operation can be time consuming.
    Yes this is premature optimisation. But nothing wrong with mentioning that creating new variable/object and copying data not always cheap operation.

    • @RootsThatRuin
      @RootsThatRuin Před 2 lety

      He goes over that in the video preceding this one. He does a really good conceptual overview of references in that video, and this video is kind of just a hands-on implementation video.

  • @skypuff
    @skypuff Před 3 lety +3

    Informative if I do say so myself🔥🔥🔥

  • @higiniofuentes2551
    @higiniofuentes2551 Před rokem

    Thank you for this very useful video!

  • @higiniofuentes2551
    @higiniofuentes2551 Před rokem

    The variable name data is the same outside of the function and inside of the function, is a bit confusing because I thought it could be different?

  • @keithrunyon7746
    @keithrunyon7746 Před 2 lety

    What is the graphics libary you are using in the advertisement?

  • @skypuff
    @skypuff Před 3 lety

    This is a wonderful and insightful video

  • @yourFavComment
    @yourFavComment Před 2 lety

    dude thank you so much!

  • @DanielLevinedigitalpixel

    Hey Caleb. Great Video. Question. Why does passing a function parameter by reference give a different answer to passing it by value. What is the reasoning here? Thanks in advance

    • @haroonstar2195
      @haroonstar2195 Před rokem

      It is because when passing a value of the function work, we copy the value of a to x and then increment x. Since we copied a to x and only x was incremented, this means the value of a is the same since it was not put through the function at all.
      When we set x as a reference instead, it means a and x share a value instead. So now x is being incremented by the function work, which also affects a now since they are referring to one another. That's why the value was different when he used the reference.

  • @arihanttonage7436
    @arihanttonage7436 Před 3 lety

    Why did it not work if the argument was a vector(not reference) and when the value was passed?

    • @arihanttonage7436
      @arihanttonage7436 Před 3 lety

      @Peterolen oh,right.
      So it had to be done using pass by reference

  • @Someone-kw6mw
    @Someone-kw6mw Před 3 lety +7

    How to make a game using C++

    • @lexuthelexer1212
      @lexuthelexer1212 Před 3 lety

      Great question, did you find anything about it?

    • @lexuthelexer1212
      @lexuthelexer1212 Před 3 lety

      @Artem Katerynych Thanks for the information, i tried to install SFML once but the problem is, i dont know how to install third-party libraries. Can you please explain how i install them?

    • @lexuthelexer1212
      @lexuthelexer1212 Před 3 lety

      @Artem Katerynych Visual Studio Code

    • @lexuthelexer1212
      @lexuthelexer1212 Před 3 lety

      @Artem Katerynych i tried VS 2019 before i got to VS Code. I just like VS Code better

  • @JustThink2000
    @JustThink2000 Před 2 měsíci

    Makes a lot of sense but still confusing

  • @polisheikh1739
    @polisheikh1739 Před 3 lety

    Please give me advice..Give a oracal pdf book....Link plz give me. .

  • @Memes_uploader
    @Memes_uploader Před 2 lety

    Thanks bro

  • @pierfrancescopeperoni
    @pierfrancescopeperoni Před 3 lety

    4:35 You trolled us.

  • @turdle69420
    @turdle69420 Před 3 lety

    const ref

  • @Krypt708
    @Krypt708 Před 3 lety

    monster???

  • @Sky-nm3df
    @Sky-nm3df Před 3 lety

    c++ is really back XD

    • @Sky-nm3df
      @Sky-nm3df Před 3 lety

      for that time, by this time its no longer c++ lol XD

  • @EricSchmidutz
    @EricSchmidutz Před 5 měsíci

    Definitely Coke

  • @unodos1821
    @unodos1821 Před 3 lety +1

    The most basic, it does nothing.lol

  • @anikapsarah8075
    @anikapsarah8075 Před 3 lety +3

    Extremely knowledgeable and genuinely cares about the success of his . Over all my sessions with Sir Scott Wilson ,I’ve come to conclude he has the best win ratio of 95+ and his sincerity is something you won’t find anywhere. Great place to earn and be supported by successful seasoned traders.