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:
2003-10-26 17:17:33 -05:00
parent 1b69486f3c
commit d69652025d
5 changed files with 194 additions and 39 deletions

View File

@@ -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