nucLeaRsc2

Untitled

Jul 29th, 2015
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. vector<Test*> v;
  2. Test *x = new Test(55,35);
  3.  
  4. for(int i=0; i<10; i++){
  5. if(i == 5)
  6. v.push_back(x);
  7. else
  8. v.push_back(new Test(i, i*2));
  9. }
  10.  
  11. printVector(v);
  12. delete x;
  13. x = NULL;
  14. printVector(v);
Advertisement
Add Comment
Please, Sign In to add comment