Ethan Ferguson
Ethan Ferguson

Reputation: 69

expected unqualified-id before '[' token arduino

i created this code for an arduino adaptation of the board game quarto:

#include <stdint.h>
#include <SeeedTouchScreen.h>
#include <TFTv2.h>
#include <SPI.h>

void setup() {
Tft.TFTinit();
Serial.begin(115200);
bool[12][12] NUPieces;
}
void loop() {

}

but it returned this error:

Arduino: 1.6.5 (Windows 8), Board: "Arduino Uno"
Quarto.ino: In function 'void setup()':
Quarto:9: error: expected unqualified-id before '[' token
expected unqualified-id before '[' token

Upvotes: 0

Views: 237

Answers (1)

suborbital
suborbital

Reputation: 13

You are declaring the array incorrectly. The correct way would be:

bool NUPieces[12][12];

Upvotes: 1

Related Questions