parsing string of numbers to int array from file

Alright, so I'm given a file with the format, "NOT 10000111" the commands and numbers change from line to line, obviously. I've had no trouble reading the command string into a string variable using the getline() function, however, I need to store each bit in its own part of an int array (e.g. array[1] = 1). The getline() function stores the entire string of bits in the first part of the array, which is bad and I need it to be less bad.

The kicker here is that I can't store the string of bits in a string variable and parse that into individual ints because my teacher has stupidly specific design guidelines.

So, if someone can help me write a few lines of code to read each bit into its own piece of the array I will be very thankful.

p.s. I'd post the code, but it's incredibly bloated, half-written, and mostly irrelevant currently.
Topic archived. No new replies allowed.