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?
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).
Best lecturer! Very Underrated.
This is one of the best explanation I've ever seen on this topic.
This is one of the best masters of games I know. Excellent explanation full of details.
Brilliant lecturer !!
Excellent lecturer.
Good explanation, looking forward to watch the other videos on other topics.
Thank you
thank you! Very well explained
Thank you, you are so great at teaching!! 😄
Good explanation! Thank you
Thanks for the great explanation!
Very good explanation. Many thanks!!
great explanation thank you so much
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?
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).
@@kamens793 So to say, pointer is a reference path?
great stuff
Could you upload the 3d software renderer with C language to Udemy? I love the platform there
Hi there. The new courses will not be uploaded to Udemy, only at pikuma.com.