- Upvotes Received
- 0
- Posts with Upvotes
- 0
- Upvoting Members
- 0
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
Hi, i'm trying to delete last node of linked list and print the remaining list at each step. for this i created 'Print' function. please take a look at this code: struct Node{ int data; Node *next; }; void Print(Node *head){ if(head==0) return; else{ Node *temp=head; Node *prev=head; while(temp!= NULL){ … |
|
Evil Nation A is angry and plans to launch N guided-missiles at the peaceful Nation B in an attempt to wipe out all of Nation B’s people. Nation A’s missile i will arrive in nation B at the time ti. Missile i communicates with its headquarters by unique radio signals … |
|
Hello, i want to create a vector of pointers and delete them,but i am little confused whether my code is OKAY or not. here's my code: vector<Object*> SpriteList; for(i=0;i<10;i++){ Object* tempobj; tempobj=new Object(); SpriteList.push_back(tempobj) } for(int i=0;i < (int) SpriteList.size();i++){ delete SpriteList[i]; SpriteList.erase(SpriteList.begin()+i); } is there any memory Leak??plz help... |
|
Hey i have one questio .....plzz do answer........ i have 3 classes A,B and D A is base class........ if B is derived from A.. can we derive C from both A and B......?? |