Address of operator & | Modern Cpp Series Ep. 18

preview_player
Показать описание

►Lesson Description: In this lesson I teach you about the ampersand (&) operator. The & will retrieve the address of a variable so you can figure out where it lives in memory (though we don't necessarily know if it is from stack or heap without a little bit of further introspection). I often use '&' to help debug and understand which piece of memory (i.e. which variable) I am modifying.

►Please like and subscribe to help the channel!
Рекомендации по теме
Комментарии
Автор

Simple + clear + to the point + short = Brilliant explanation thank you so much Mike

sallaklamhayyen
Автор

The content here is great here!
I am finding these lessons very useful, thanks a lot

galthram
Автор

Love the Playlist! Thank you very much!<3

alexanderpaulik
Автор

Now that is called pure beauty..liked and suscribed Sir..🙏.

shaileshdubey
Автор

Can't wait for references - I always get in a mess when passing a pointer or taking in a reference.

cgabriel
Автор

for (void*)&, the & return a pointer to the ard, and (void*) convert it to (void*) right?

kafuu
Автор

I noticed in my program address of x compared to y is offset by 4 (the other way around compared to yours). I am on a Windows machine if that matters (as if it fills up from bottoms up; a novice here, sorry if my lingo doesn't make a lot of sense). In any case, your point is still valid, it was just an interesting observation for me.

MindHaunter
Автор

😀 So interesting: std::cout << "&c : " << (void *)&c << std::endl;😄, Thansk you Mile.

joshbrice
Автор

Interesting, I didn't know that functions were always loaded in memory, that means that when you start a program the os allocates RAM and puts all your program functions there ?
How is it encoded ? Is it assembly instructions encoded in bynary ?

alexandresendra
Автор

Hey mike, thanks so much for the video(s), they've been really helpful so far. I have one question from this one though ; why does it give the address of "y" alone but doesn't do the same for a, b and c? couldn't understand that part. thanks :)

xerxes_
Автор

This casting to address is very confusing and makes me feel like "No way I'm going to pass all this". Gives me impression of C++ syntax is unsure what it is

Kirfx
welcome to shbcf.ru