Skip to content

Instantly share code, notes, and snippets.

@ericye16
Created June 18, 2015 22:01
Show Gist options
  • Save ericye16/5797e1836a0117d9a5cf to your computer and use it in GitHub Desktop.
Save ericye16/5797e1836a0117d9a5cf to your computer and use it in GitHub Desktop.
#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