I need to clear/reset an input record I'm using within a loop. Normally, with a basic struct/type such as int, I would do something like the following:
Code:
int x;

while(true)
{
    x = 0;

    cin >> x;

    switch(x)
    {
        case 1:
            break;
        case 2:
            break;
    }
}
This way, if nothing were assigned to x, but x was 2 in the preceeding iteration, it wouldn't re-execute case 2.

How could I do the same with an input record?