1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
const int ARRAY_CAP = 100;
int main()
{
int aList[ARRAY_CAP];
int size = 0;
print(aList, size);
insert(10, aList, size);
insert(10, aList, size);
insert(4, aList, size);
insert(40, aList, size);
insert(25, aList, size);
print(aList, size);
if(!remove(5, aList, size))
{
cout << "the list doesn't have 5" << endl;
}
if(!remove(10, aList, size))
{
cout << "the list doesn't have 10" << endl;
}
if(!remove(40, aList, size))
{
cout << "the list doesn't have 40" << endl;
}
if(!remove(4, aList, size))
{
cout << "the list doesn't have 4" << endl;
}
print(aList, size);
return 0;
}
|