I'm somewhat new to C++, and I was wondering how to scanf into or printf out of a bitset, i.e., what is the appropriate type specifier for I/O to a bitset index? An example of what I would want to do is:
#include <bitset>
#include <stdio.h>
using namespace std;
int main()
{
bitset<1> aoeu;
scanf("%d" &bitset[0]); //this line
printf("%d" bitset[0]); // this line
}