Could anyone explain to me what this line means?

int a = b.size() - 1;
b looks like come sort of (standard library) container, eg vector, for which the size method is defined that returns the number of elements in the container

http://en.cppreference.com/w/cpp/container/vector/size
b.size() - 1 assigns the last index of b to a.

So, b[a] would be the last element. Unless b has no elements.
Last edited on
You do not show the type of b.

If the code is legit, then the b must be a class (or struct) that has member function named "size" and the "size" returns a value that can implicitly convert to number.

That is all that we know with the given information.
Topic archived. No new replies allowed.