I get the following error:
Cube.cpp:10: error: expected initializer before ‘<<’ token
Here's the important parts of the header file:
#ifndef CUBE_H #define CUBE_H #include <cstdlib> #include <QtCore/QtCore> #include <iostream> #define YELLOW 0 #define RED 1 #define GREEN 2 #define ORANGE 3 #define BLUE 4 #define WHITE 5 using namespace std; class Cube { public: ... static QList<int> colorList; ... }; #endif Here's the line that gives the error:
QList<int> Cube::colorList << YELLOW << RED << GREEN << ORANGE << BLUE << WHITE;