Skip to content
Snippets Groups Projects
Commit 3154d087 authored by TheHresvelgian's avatar TheHresvelgian
Browse files

enabled elaving delete loop

parent f84afa12
No related branches found
No related tags found
No related merge requests found
......@@ -66,7 +66,9 @@ void deletePlayer()
switch (choice)
{
case 1:
//delte
playerList[index]=playerList[playerList.size()-1];
playerList.pop_back();
toDelete=false;
break;
case 2:
toDelete=false;
......@@ -75,7 +77,6 @@ void deletePlayer()
cout << endl << "Invalid input!";
break;
}
} while (toDelete);
choice = lesInt("\nDo you wish to delete another player?\n1: yes\n2: no",1,2);
switch (choice)
......
......@@ -8,10 +8,6 @@ extern vector<Player*> sortedRankings;
int searchByID(int id, int list)
{
if (playerList.size()==0)
{
return -2;
}
vector<Player*> listToUse;
if (list == 1)
{
......
......@@ -8,10 +8,6 @@ extern vector<Player*> playerList;
int searchByName(string name)
{
if (playerList.size()==0)
{
return -2;
}
vector<Player*> searchlist;
string playerName;
int findSize = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment