### how to determine biggest size of array

the codes below is not complete
bacause i have a problem in determining biggest size of array
first,the program will ask user to enter number
numer '2' for delele id,
alhough say 'delete' but just need replace it enough
for example,as you can see
i have set 4 elements for the array
if i choose id[2] to delete
then id[3](the last size of array) will repalce id[2]
so the problem is what if i choose menu'1' to add new id (call it "id[4]")
how can i determine id[4] to replace id[2] if i want to delete id[2]
*user can add more than 1 id and go back to menu for delete other id.

 ``123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101`` ``````#include #include using namespace std; void addstudent(string fid[]) { char type; for (int a=2; a<=199; a++) { cout<<"Enter ID :\n"; cout<<"eg : 10000"<>fid[a]; cin.ignore(); cout<<"Do you want continue to add id(YES press Y or NO press N) :\n"; cin>>type; if(type == 'Y' || type == 'y') continue; else break; } } void removestudent(string fid[]) { string searchid4; char remove; for (int b=0;b<10;b++) { cout<<"Enter ID you wan to delete :"<>searchid4; for(int d=0; d<=199; d++) { if(searchid4 == fid[d]) { //how to set code here? } } } } int main() { string id[200]; int menu; id[0]=1000; id[1]=1001; id[2]=1002; id[3]=1003; char back; for(int z=0; z<=10; z++) { cout<<"MENU LIST\n"; cout<<"------\n"; cout<<"1) Add id\n"; cout<<"2) Delete id\n"; cout<>menu; cin.ignore(); cout<>back; if(back == 'Y' || back =='y') continue; else break; cout<
Last edited on