Zdanie w tytule potwierdza taki o to kod
#include < iostream > int main( ){ int iTestVariable = 0; int & iReference = iTestVariable; int * iPointer = &iTestVariable; std::cout << "Variable \tAddress\t" << &iTestVariable << "\n" << "Reference \tAddress\t" << &iReference << "\n" << "Pointer \tAddress\t" << &iPointer << std::endl; std::system( "pause" ); }
Jak widzimy zmienna iTestVariable oraz referencja do niej ( iReference ) mają ten sam adres więc jest to ten sam „obiekt” pod różnymi nazwami.
Zaś wskaźnik jest kompletnie innym obiektem który przechowuję tylko adres zmiennej.
Trochę skąpo opisane. Ale przynajmniej wyjaśnia sprawę 😉