I have problems with lines 75 and 107, with which I get a "non-lvalue in assignment" error. Everything else seems just fine... I might know what it is but I thought you guys could give us a hint on how to use reinterpret_cast properly.
You can not do what you are trying to do. The compilation error is a syntax error (you need to reference the pointer), but the real problem is that you're trying to reinterpret_cast with non-POD types.
AeonFlux1212 wrote:
how to use reinterpret_cast properly.
Impossible - by design, there is no proper way to use it.
Hello again... after a lot of testing and debugging I figured out that casting a char* to a bitset<>* and vice-versa simply doesn't work... like L B mentionned earlier... I mean it works, but you can't really use the results like I wanted to use them.
So I had to make my own charTObits and bitsTOchar functions, and now everything seems to work just fine... :-)
Thanks for the help, reply if you have any questions.