Guest User

Untitled

a guest
Feb 22nd, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. void foo()
  6. {
  7. double *pt2 = new double;
  8. *pt2 = 10;
  9.  
  10. cout << *pt2 << endl;
  11. }
  12.  
  13. int main()
  14. {
  15. double *pt;
  16. *pt = 5;
  17.  
  18. foo();
  19.  
  20. cout << *pt << endl;
  21. }
Add Comment
Please, Sign In to add comment