How can I print a value of a reference to a pointer?
int& createInt(){
auto uPtr = make_unique<int>(2);
auto ptr(uPtr.get() );
return *ptr;
}
How would I print value 2
when I call createInt()
function?
int& x = createInt(); // what will be the value of "x"