Mitt första exempel fungerar utmärkt, men då jag återanvänder nästan samma kod hela tiden så skulle jag vilja lägga allt i en array för att lättare kunna stega igenom samma sak med bara små justeringar.
Detta använder jag idag och det fungerar.
Kod: Markera allt
#include "CountdownTimer.h"
CountdownTimer * g_countdowntimer_Led_1 = new CountdownTimer(100);
CountdownTimer * g_countdowntimer_Led_2 = new CountdownTimer(200);
CountdownTimer * g_countdowntimer_Led_3 = new CountdownTimer(300);
Kod: Markera allt
#include "CountdownTimer.h"
CountdownTimer * g_countdowntimer_Led[3];
g_countdowntimer_Led[0] = new CountdownTimer(100);
g_countdowntimer_Led[1] = new CountdownTimer(200);
g_countdowntimer_Led[2] = new CountdownTimer(300);
Var har jag tänkt fel?