Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <vector>
- using namespace std;
- int main(void)
- {
- vector<bool> tab;
- // ...
- int somme = 0;
- for(size_t pos=0; pos < tab.size(); pos++)
- {
- somme <<= 1;
- somme += tab[pos];
- }
- // ...
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement