Hello. I have looked in your tutorial but I am still stumpted. You have included <vector> but you don't even use any vectors in your code. What should I do now?
Here is the troublesome code, where uint is unsigned int:
Here are the errors I get from BM:
In member function `void
gametype::boardtype::placemines(unsigned int)':
`vector' undeclared (first use this
function)
(Each undeclared identifier is reported only
once for each function it appears in.)
parse error before `;' token
parse error before `;' token
`placementx' undeclared (first use this
function)
`placementy' undeclared (first use this
function)
`random_shuffle' undeclared (first use this
function)
Here is the troublesome code, where uint is unsigned int:
void placemines(uint mines) { remaining = (x-2) * (y-2) - (minenum = mines); srand(time(0)); vector<uint> placementx(x-2); vector<uint> placementy(y-2); forall(i, x-2) placementx[i] = i+1; forall(i, y-2) placementy[i] = i+1; random_shuffle(placementx.begin(), placementx.end()); random_shuffle(placementy.begin(), placementy.end()); forall(i, mines) mine[placementx[i]][placementy[i]] = true; }
Here are the errors I get from BM:
In member function `void
gametype::boardtype::placemines(unsigned int)':
`vector' undeclared (first use this
function)
(Each undeclared identifier is reported only
once for each function it appears in.)
parse error before `;' token
parse error before `;' token
`placementx' undeclared (first use this
function)
`placementy' undeclared (first use this
function)
`random_shuffle' undeclared (first use this
function)