c++ - Why is my multiplication being treated like a pointer? -
c++ - Why is my multiplication being treated like a pointer? -
edit: simple error looked over, , wasn't thinking. ignore :)
my code brings error:
no match 'operator*' in 'maprows * width' on code
// current tile number int tilenumber = levelmap[maprows*width + currenttile]; declared at:
for (auto& maprows : levelmap) (auto& currenttile : maprows) //it loops through rows, goes through tiles in column. { and width at:
bool map::load(const std::string& tileset, sf::vector2u tilesize, unsigned int width, unsigned int height) and levelmap at:
std::vector<std::vector<tile>> levelmap; sorry, beginner!
maprows appears std::vector<tile> multiplication int doesn't create sense. that's error telling you.
c++
Comments
Post a Comment