I realised that I can't have pointer to bitset, unlike int *.Code:bitset<8> *t1, *t2; t2 = new bitset<8> [1]; *t1 = t2;
When i assign *t1, *t2, each of them have their own memory allocation, so when *t1=t2, the address of t1 is unchanged, not t2.
Anybody has idea on how to have pointers for bitset?