c++ create and delete int pointer


SUBMITTED BY: Guest

DATE: Nov. 19, 2013, 2:38 p.m.

FORMAT: C++

SIZE: 171 Bytes

HITS: 907

  1. int main(){
  2. //Creating new pointer
  3. int *ptr = new int(10);
  4. //removing pointer from memory
  5. delete ptr;
  6. return 0;
  7. }

comments powered by Disqus