From 7c15300c694a842073b3e358dad82f63da4a1b8d Mon Sep 17 00:00:00 2001 From: Kyle Isom Date: Sat, 7 Oct 2023 16:28:54 -0700 Subject: [PATCH] dynamically allocate structures --- include/Mode.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/Mode.h b/include/Mode.h index 7f642fa..73d63a4 100644 --- a/include/Mode.h +++ b/include/Mode.h @@ -2,10 +2,11 @@ #define KIMODEM_MODE_H -static struct Mode { +struct Mode { bool (*Process)(); bool (*Update)(); -} *currentMode(nullptr); +}; +static Mode *currentMode = new Mode; #endif \ No newline at end of file