-
-
Save kasramp/09725762fcc63e09af79be1d12a6395b to your computer and use it in GitHub Desktop.
This file contains 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
int main(int argc, char *argv[]) { | |
Test t1; | |
Test *t2; | |
t2 = &t1; | |
t2 -> x = 100; | |
cout << t2 -> x << endl; // prints 100 | |
cout << t1.x << endl; // prints 100 | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment