For example, so (if zeros and ones are separated by spaces; if not, say, I will write)
ifstream fs ("file"); if (! fs.is_open()) return 1; int aa [2][8], n = 0; while (n < 2*8 && fs >> *((int*) aa + n++));
PS In connection with the clarification of conditions, I propose such a code
ifstream fs ("file"); if (! fs.is_open()) {cerr << "Bad file\n"; return 1;} int a[2][8]; size_t n = 0; char c; while (n < 2*8 && fs.read (&c, 1) ) { if (c == '0') ((int*) a)[n++] = 0; else if ( c == '1') ((int*) a)[n++] = 1; }