For some reason, when I try to initialize a vector I end up getting an "operator=" error which I can't seem to figure out. I'm still fairly new to C++, so there's a lot to learn. Anyway, here's my header and source file:
Error: /home/holland/Code/cpp/Bingo-build-desktop-Desktop_Qt_4_7_4_for_GCC__Qt_SDK__Release/../Bingo/board.cpp:10: error: no match for ‘operator=’ in ‘((Board*)this)->Board::m_boardValues = (operatornew(24u), (<statement>, ((std::vector<unsignedint>*)<anonymous>)))’
This: new std::vector<unsignedint>();
allocates heap memory for your vector, and returns a pointer to that memory (i.e. pointer to std::vector<unsigned int>). And your try to assign it to a non pointer (i.e. std::vector<unsigned int>): this->m_boardValues = new std::vector<unsignedint>();
You could make the data member a pointer to an std::vector<unsignedint>, but as far as I can see, just leave the data member the same and remove this line: this->m_boardValues = new std::vector<unsignedint>();
You seem to be trying to call the default constructor of a class type member variable, an action which is automatically added by the compiler at the start of your class' constructor.