Hi,
I'm trying to compare elements in two different vectors.

I wrote this:

if (a = b[j])
same = true;

and the compiler said this about the first line:

assignment of read-only location

What does "assignment of read-only location" mean?

Thanks.

= is the assignment operator, not equivalence test operator, and you probably declared a as const.

Thanks for your help.