Skip to content

Instantly share code, notes, and snippets.

@AhmedHelalAhmed
Created December 2, 2017 11:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AhmedHelalAhmed/a2ac4fb0f4269172ac1398ac648de4af to your computer and use it in GitHub Desktop.
Save AhmedHelalAhmed/a2ac4fb0f4269172ac1398ac648de4af to your computer and use it in GitHub Desktop.
reference to pointer
#include <iostream>
using namespace std;
int main()
{
int z=5;
int* x;
int*& y=x;
x=&z;
cout<<"x= "<<x<<endl;
cout<<"y= "<<y<<endl;
cout<<"*y= "<<*y<<endl;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment