Here are the results
writting
int ** pp;
int * p;
int v = 5;
p = &v; //you say "pointers point to references "
*pp = p; //Therefore, you could say *pp = p , because "p"
//is a pointer and you are assigning it to a pointer
cout << **p; //BUT this crashes when you run the program!
//what did work was
pp = &p;
cout << **p;
// I didn't quite got what you said in paragraph 2 but thinking it well it helps what you said on first paragraph
pointers point to references
, Im generalizing this as "any pter(single, pointer to pter, ppp, pppp , jaja... etc )" points to a reference of its pointee
well this so far makes sense but what happens in the next case
#include <iostream>
using namespace std;
class ppr{
public:
ppr(int & r): p(r){}
int * p;
};
int main()
{
int x = 5 ;
ppr rr(x);
cout << *(rr.p);
// shuts
system("pause");
}
it won't compile it says the familiar invalid conversion from int to int*
in this part
now I wonder: Why the error. am I not giving the pter a reference to the int alredy!?
BTW about my previous error I can't believe you compiled that without problems, this thing of mine won't let me