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

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -