I am working on DES encryption (it's a school project), and I need to use an array of bitsets. How do I go about doing this?
I've tried:
bitset<64> subkeys[16];
But when I try to access f.e. 'subkeys[1]' the compiler thinks I mean bit° 1 in a (non-array) variable 'subkeys'.
I am also not able to pass a pointer to a bitset from one function to another. I assume I'm doing something wrong, but I'd like to know if it's possible in the first place.
Google wasn't able to bring me any closer to a solution. I hope you guys can!
[root@admin shm]# c++ bitset.cpp && ./a.out
0000000000000000000000000000000000000000000000000000000000000000
[root@admin shm]# c++ --version
c++ (GCC) 3.4.5
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[root@admin shm]#
seems my compiler works fine on it. throw your compiler to garbage can plz.