C++ Objects: Stack vs. Heap

แชร์
ฝัง
  • เผยแพร่เมื่อ 10 พ.ย. 2024

ความคิดเห็น • 19

  • @notovertaken8330
    @notovertaken8330 3 ปีที่แล้ว +10

    Best lecturer! Very Underrated.

  • @d.h.y
    @d.h.y ปีที่แล้ว +2

    This is one of the best explanation I've ever seen on this topic.

  • @pollirodrigo
    @pollirodrigo ปีที่แล้ว +2

    This is one of the best masters of games I know. Excellent explanation full of details.

  • @yoman9446
    @yoman9446 3 ปีที่แล้ว +4

    Thank you

  • @arkemal
    @arkemal หลายเดือนก่อน

    thank you! Very well explained

  • @quentin7343
    @quentin7343 2 ปีที่แล้ว +1

    Excellent lecturer.

  • @simaobonvalot9141
    @simaobonvalot9141 ปีที่แล้ว

    Good explanation, looking forward to watch the other videos on other topics.

  • @Assafist
    @Assafist 2 ปีที่แล้ว +1

    Brilliant lecturer !!

  • @baringkiron5375
    @baringkiron5375 8 หลายเดือนก่อน

    Thank you, you are so great at teaching!! 😄

  • @joscaz
    @joscaz 9 หลายเดือนก่อน

    Thanks for the great explanation!

  • @stasbakalo6264
    @stasbakalo6264 2 ปีที่แล้ว +1

    Good explanation! Thank you

  • @sallaklamhayyen9876
    @sallaklamhayyen9876 2 ปีที่แล้ว +1

    great explanation thank you so much

  • @andregrobler4393
    @andregrobler4393 2 ปีที่แล้ว

    Very good explanation. Many thanks!!

  • @kera9798
    @kera9798 5 หลายเดือนก่อน

    great stuff

  • @federicoriva7928
    @federicoriva7928 3 ปีที่แล้ว +1

    Really great explanation but there's one thing that i still don't get: when you talk about Enemy* enemy = new Enemy(), you say at 8:30 that "an object is a pointer to something in memory" and immediately afterwards you "all we have is a pointer to an object". So we have an object, enemy, allocated in stack which is pointing to an object allocated in heap? Why enemy is considered also an object and not just a pointer to an object? In simple words, is a pointer to an object considered to be an object?

    • @kamens793
      @kamens793 3 ปีที่แล้ว +1

      Not really, objects and pointer of a object are two different things. When you create a object with the key word new ( Enemy* enemy = new Enemy() ), your are doing two things:
      1- Allocating memory on the heap for that object.
      2- Asigning the address of that memory allocated to a variable called enemy.
      The variable enemy only contain the address, everytime you call it it will only point to the location of the object in the heap (That's why is called pointer).

    • @alleyesonme1432
      @alleyesonme1432 ปีที่แล้ว

      @@kamens793 So to say, pointer is a reference path?

  • @notovertaken8330
    @notovertaken8330 3 ปีที่แล้ว

    Could you upload the 3d software renderer with C language to Udemy? I love the platform there

    • @pikuma
      @pikuma  3 ปีที่แล้ว

      Hi there. The new courses will not be uploaded to Udemy, only at pikuma.com.