Я пытаюсь разобраться в деталях использования указателей и ссылок.
Здесь я оставил несколько комментариев, которые могут показать ход моих мыслей:
using namespace std;
#include
int main()
{
int ref; // A variable at an unknown memory address (lets call the address X)
int *point; // An empty memory address (lets call the address Y)
ref = 3; // An int 3 is stored at address X
point = &ref; // Address Y now contains 'ref'
//What happened to address X? Are there two addresses now, known and unknown?
cout
Подробнее здесь: https://stackoverflow.com/questions/788 ... o-a-pointe
Мобильная версия