I am having trouble creating a bit mask, the whole concept is not really sticking with me. This program stores multiple numbers into a single variable and then should be able to extract each one as requested.
#include <iostream>
#include <ctime>
using namespace std;
int mask(unsigned int packit);
void main(){
srand(time(NULL));
unsigned int packit = 0;
unsigned int temp;
int request;
int mask = 1;