Code generator

Hey! Does anyone have and idea how to make a program which shows me all the 6 digit combinations of 1 and 0 ? Thank you!
Print in binary, the result of
for ( int i = 0 ; i < (1<<6)-1 ; i++ )
1
2
3
#include <iostream>
#include <bitset>
int main() { for ( int i = 0; i < 64; i++ ) std::cout << std::bitset<6>( i ) << '\n'; }
Topic archived. No new replies allowed.