Adding final assignment updates

This commit is contained in:
Christopher Sanden
2025-11-13 15:15:01 +01:00
parent ae8a53e16b
commit 58772c0488
15 changed files with 6127 additions and 4 deletions

View File

@@ -1,7 +1,26 @@
#include <iostream>
#include "main.h"
#include "SharedLib.h"
static TLinkedList g_list(false);
static std::vector<TBankAccount*> g_array;
static bool onNameRead(const int idx, const int total, const std::string& first, const std::string& last)
{
auto* acc = new TBankAccount(EBankAccountType::Checking, first, last);
g_list.Append(acc);
g_array.push_back(acc);
return true;
}
int main()
{
std::cout << "Hello, World!" << std::endl;
readNamesFromFile("random_names.txt", onNameRead);
Sort sorter(g_array.data(), (int)g_array.size(), &g_list);
return 0;
}