Adding assignment 1

This commit is contained in:
Christopher Sanden
2025-10-13 17:19:15 +02:00
commit 7a8b356e96
13 changed files with 214 additions and 0 deletions

33
assignment1/TMovieList.h Normal file
View File

@@ -0,0 +1,33 @@
#ifndef IKT203_TMOVIELIST_H
#define IKT203_TMOVIELIST_H
#include "TMovie.h"
#include "TMovieNode.h"
using namespace std;
class TMovieList {
private:
TMovieNode* head;
public:
TMovieList() : head(new TMovieNode(nullptr)) {}
~TMovieList()
{
TMovieNode* current = head;
while(current)
{
TMovieNode* next = current->GetNextNode();
delete current;
current = next;
}
head = nullptr;
}
};
#endif //IKT203_TMOVIELIST_H