Quote:
you are right in saying t1 is pointing to t2, but go and check &t1 and &t2,
they are of different memory allocation, this is the weakness of bitset. you can only point to t2 but what if you want to store the memory of t2?
No, that is not a weakness of bitset. &t1 is the address of t1. &t2 is the address of t2. t1 and t2 contain addresses, and the address contained by t1 is the same as the address contained by t2 because they point to the same array. The address of t1 and the address of t2, on the other hand, are different, because they are not the same pointer. This applies even if t1 and t2 are int*s instead of bitset<8>*s.