In the tutorial for sf:VertexArrays, this line of code is given as an example declaration:
sf::VertexArray quad(sf::Quads, 4);
However, when I copy and paste this into my own project, like so:
struct Tetromino{
std::string filename;
sf::VertexArray quad(sf::Quads, 4);
// write a constructor taking a string and four vertices
Tetromino(std::string filename, sf::VertexArray squares);
~Tetromino();
};
I get the error "constant sf::Quads is not a type name". Why is this happening? Is this a bug or error in the documentation?