Created
April 15, 2018 08:36
-
-
Save VenkataPavan2494/36587c78c79f836f4b168a2546a9daa3 to your computer and use it in GitHub Desktop.
References from pointers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main(int argc, char ** argv) { | |
int myInteger {10}; | |
cout << "myInteger = " << myInteger << endl; | |
int * pMyInteger = &myInteger; | |
cout << "*pMyInteger = " << *pMyInteger << endl; | |
int & refMyInteger = *pMyInteger; | |
cout << "refMyInteger = " << refMyInteger << endl; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment