Classes Part 31 - The ‘this’ keyword - Modern Cpp Series Ep. 68

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

КОМЕНТАРІ • 5

  • @dhanushs1802
    @dhanushs1802 2 роки тому +2

    Great Video. Very neatly explained as always. Thank you.

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

      Cheers, thank you Dhanush!

  • @blaisofotso3439
    @blaisofotso3439 2 роки тому +2

    Hallo Mike,
    &Rishit is on the stack right? and the pointer *Rishit stores the address of the current object allocated on the heap.
    Mike is an obejct, but what about *Rishit? he is a pointer to the object stored in the heap. So how is the this keyowrd realted to *Rishit?

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

      'Rishit' is of type Person* and that is stored on the stack, and points to memory on the heap. :)

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

    Hello, Mr. Mike Shah, I pray things are going well for you.
    I've run into a problem I don't think I can get past, and it's a known bug with GNU compilers, perhaps you are aware of. I said to God today, as I was praying, I basically said, if I whom am not good at these things am frustrated, I can imagine how much more frustrated those who are much better than I, at all the things that are hampering our creative abilities. My problem is with concern to seekg() and tellg(), creating bad segmentation and tellg() not returning accurate file positions, though it doesn't seem to be an issue with "Microsoft's" Visual Studios. I don't want to use their software any more than I have to, because I feel they are the one's sabotaging the system that people use outside of their own.