Unsorted List ADT

Hello Guys: I've got this question, can someone explain...does the following main segment of code cause a semantic error if using the List Class from the Unsorted List ADT given in class? Explain why it is correct, or why it is not correct. Assume the maximum size is 25. …
int main()
{
UnsortedType numlist;

int number;

for (int i = 0; i < 10; i++)
{
cin >> number;
numlist.insertItem(number);
}

numlist.MakeEmpty();

for (int i = 0; i < 10; i++)
{
numlist.deleteItem(number);
cout << number << endl;
}

return 0;
}
Topic archived. No new replies allowed.