Question about reference
this is my code int a=1; int& p=a; in this situation that use only 1 memory space , but it have two variable name(a & p) is it right? sorry my poor english
your statement technically isn't right, but I see why you think that. it is true that is you call the memory location or p (&p) and memory location of a (&a) it should both say something like 0x0f08a72. however when we access RAM we're not accessing the physical location of our variables but the virtually allocated location. So the physical location of p and a might be on completely separate sticks but virtually they're the same.
中国人吗？汉语说一下你的问题，，也许我能解答，，，my english is poor too,
thts chinese and not english r u being sarcastic or what?