A
and.280.c
hello m newbie at here now i have a problem with the "Reference" in "C+
+". i am following the Book("C++ Primer,Fourth Edition")
there is The Question
#include<iostream>
int main()
{
int i, &ri = i;
i = 5; ri =10;
std::cout << i << " " << ri << std::endl;
}
and the compiler return the answer 10 10
can there anyone who can tell me about it
how compiler take the value and return it
Andry
+". i am following the Book("C++ Primer,Fourth Edition")
there is The Question
#include<iostream>
int main()
{
int i, &ri = i;
i = 5; ri =10;
std::cout << i << " " << ri << std::endl;
}
and the compiler return the answer 10 10
can there anyone who can tell me about it
how compiler take the value and return it
Andry