Reading a file in C++ which has integers
Posted
by
Avinash
on Stack Overflow
See other posts from Stack Overflow
or by Avinash
Published on 2011-11-18T07:36:29Z
Indexed on
2011/11/18
9:50 UTC
Read the original article
Hit count: 171
c++
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 1
s.
© Stack Overflow or respective owner