Added error reporting to the LEVEL::Execute Function
Added the LEVEL::ConsolePrint Function Added the quit command this can be used in a config file Fixed console to make it work more logically and allow for output
This commit is contained in:
@@ -37,6 +37,7 @@ public:
|
||||
void FirstPosition();
|
||||
void LastPosition();
|
||||
void Clear();
|
||||
unsigned int Length();
|
||||
void operator=(const list<ItemType>&);
|
||||
ItemType operator[](LIST_ARRAY_INDEX_TYPE) const;
|
||||
ItemType& operator[](LIST_ARRAY_INDEX_TYPE);
|
||||
@@ -339,4 +340,24 @@ ItemType& list<ItemType>::operator[](LIST_ARRAY_INDEX_TYPE index)
|
||||
}
|
||||
}
|
||||
|
||||
template <class ItemType>
|
||||
unsigned int Length()
|
||||
{
|
||||
if (head == NULL)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
int len = 1;
|
||||
listNode<ItemType> temp = head->next;
|
||||
while (temp != NULL)
|
||||
{
|
||||
temp = temp->next;
|
||||
len++
|
||||
}
|
||||
return len;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user