Reading a file in C++ which has integers
- by Avinash
I want to read following file in C++.
000001011100110
100000010101100
001001001001100
110110000000011
000000010110011
011000110101110
111010011011110
011001010010000
I know already how many rows and columns is there in the file. I want to read each integer and store it in a 2-D matrix of ints.
Each integers here means 0 is one entry and 1 is another entry. So in this example above there are 15 0's and 1s.