#include "listnode.h"
#include "aClient.h"
+
template <class T>
class List {
public:
{
tempPtr = currentPtr;
currentPtr = currentPtr->Next();
-// if (!tempPtr->getData()->stats || tempPtr->getData()->stats->started == 0)
cout << "Deleting Memory address: " << tempPtr->getData() << endl << flush;
delete tempPtr;
-// else
-// tempPtr->getData()->stats->started = 0;
}
cout << "All Nodes destroyed" << endl;
}
currentPtr = firstPtr;
while (currentPtr)
{
- cout << "aClient: " << currentPtr->getData() << flush;
+ cout << "aClient: " << *currentPtr->getData() << flush;
if (currentPtr->getData()->stats)
- cout << " Player Name: " << ¤tPtr->getData()->stats->name
- << " Password: " << ¤tPtr->getData()->stats->password << flush;
+ cout << " Player Name: " << currentPtr->getData()->stats->name
+ << " Password: " << currentPtr->getData()->stats->password << flush;
cout << endl;
currentPtr = currentPtr->next;
}