I'm working on a drum pad to learn C++ programming.
I'm using a class called DrumSensor which I need to create 5 times in an array.
I'm using a header file "settings.h" to store variables I'll use throughout my code.
settings.h
extern DrumSensor sensor[5];
settings.cpp
#include "settings.h"
DrumSensor sensor[5];
I've been experiencing a lot with this global object array, but I've never been able to compile it.
I tried to find references such as:
The problem is, no matter how I try to declare my "DrumSensors", I get the following error: ... multiple definition of ...
You can take a look at the code here: https://github.com/woodencase01/DrumSensor