Created
June 18, 2015 22:01
-
-
Save ericye16/5797e1836a0117d9a5cf 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
#include <iostream> | |
using namespace std; | |
int main() { | |
int *p = new int(5); | |
delete p; | |
int *q = new int(7); | |
cout << *p; | |
cout << "p == q: " << p == q ? "true" : "false"; | |
delete q; | |
} | |
/* | |
Output: | |
7 | |
p == q: true | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment