Not finished, but no more time for improvements

This commit is contained in:
Christopher Sanden
2025-11-14 12:13:21 +01:00
parent 58772c0488
commit b8aa672431
3 changed files with 18 additions and 2 deletions

View File

@@ -1,4 +1,18 @@
#include <bits/stl_tree.h>
#include "SharedLib.h"
int g_printIndex = 0;
static void PrintAccCallback(TBankAccount* acc, int /*i*/)
{
std::cout << g_printIndex++ << ": " << acc->ownerFirstName << " " << acc->ownerLastName
<< " | Balance: " << acc->getBalance() << std::endl;
}
void PrintList(TLinkedList* list)
{
if (!list)
return;
g_printIndex = 0;
list->forEach(PrintAccCallback);
}