I have written my first program using vector, however I can't get it to compile. Lines using vector, like: std::vector<sf::Image> iPlants(60);
return the errors:
error: expected identifier before numeric constant|
error: expected ',' or '...' before numeric constant|
Also, I also had problems with this line: std::vector<int> Evolution::ReturnX()
I got a 'invalid declarator before 'Evolution''.
You can only initialize static const integral members within a class. For objects, you can only declare them. For your vector, you would have to declare it as a member without explicitly using a constructor (thus, using the default constructor).
This will do what you intend in the above example: