C++ Objects: Stack vs. Heap

Поделиться
HTML-код
  • Опубликовано: 4 ноя 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

  • @simaobonvalot9141
    @simaobonvalot9141 Год назад

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

  • @quentin7343
    @quentin7343 2 года назад +1

    Excellent lecturer.

  • @Assafist
    @Assafist 2 года назад +1

    Brilliant lecturer !!

  • @arkemal
    @arkemal 25 дней назад

    thank you! Very well explained

  • @baringkiron5375
    @baringkiron5375 8 месяцев назад

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

  • @stasbakalo6264
    @stasbakalo6264 2 года назад +1

    Good explanation! Thank you

  • @joscaz
    @joscaz 9 месяцев назад

    Thanks for the great explanation!

  • @sallaklamhayyen9876
    @sallaklamhayyen9876 2 года назад +1

    great explanation thank you so much

  • @andregrobler4393
    @andregrobler4393 2 года назад

    Very good explanation. Many thanks!!

  • @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?

  • @kera9798
    @kera9798 5 месяцев назад

    great stuff

  • @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.