C++ I have a file like this -------------------------------------------------------------------------------- 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 10000000000000000000000000000000000000000000000000000000000000000000000000000000 01000000000000000000000000000000000000000000000000000000000000000000000000000000 00100000000000000000000000000000000000000000000000000000000000000000000000000000 00010000000000000000000000000000000000000000000000000000000000000000000000000000 00001000000000000000000000000000000000000000000000000000000000000000000000000000 00000100000000000000000000000000000000000000000000000000000000000000000000000000 00000010000000000000000000000000000000000000000000000000000000000000000000000000 00000001000000000000000000000000000000000000000000000000000000000000000000000000 00000000100000000000000000000000000000000000000000000000000000000000000000000000 00000000010000000000000000000000000000000000000000000000000000000000000000000000 -------------------------------------------------------------------------------- 11111111100000000000000000000000000000000000000000000000000000000000000000000000 00000000011111111100000000000000000000000000000000000000000000000000000000000000 00000000000000000011111111000000000000000000000000000000000000000000000000000000 10000000010000000000000000000000000000000000000000000000000000000000000000000000 01000000001000000010000000000000000000000000000000000000000000000000000000000000 00100000000100000001000000000000000000000000000000000000000000000000000000000000 00010000000010000000100000000000000000000000000000000000000000000000000000000000 00001000000001000000010000000000000000000000000000000000000000000000000000000000 00000100000000100000001000000000000000000000000000000000000000000000000000000000 00000010000000010000000100000000000000000000000000000000000000000000000000000000 00000001000000001000000010000000000000000000000000000000000000000000000000000000 00000000100000000100000001000000000000000000000000000000000000000000000000000000 -------------------------------------------------------------------------------- 10001000100000000000000000000000000000000000000000000000000000000000000000000000 00010000011000000000000000000000000000000000000000000000000000000000000000000000 00100010000000000000000000000000000000000000000000000000000000000000000000000000 00000010000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00111000000000000000000000000000000000000000000000000000000000000000000000000000 00000000010000000000000000000000000000000000000000000000000000000000000000000000 00000001101000000000000000000000000000000000000000000000000000000000000000000000 11000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 11111001111000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 I need to read this file in columns, ignore '-------------------------' line. And store into vector at the end of code. For example: this file has format 12 rows x 80 columns. I need to read it with format 80x12, then store those data in a vector. Appreciate it.
C++
I have a file like this
--------------------------------------------------------------------------------
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
10000000000000000000000000000000000000000000000000000000000000000000000000000000
01000000000000000000000000000000000000000000000000000000000000000000000000000000
00100000000000000000000000000000000000000000000000000000000000000000000000000000
00010000000000000000000000000000000000000000000000000000000000000000000000000000
00001000000000000000000000000000000000000000000000000000000000000000000000000000
00000100000000000000000000000000000000000000000000000000000000000000000000000000
00000010000000000000000000000000000000000000000000000000000000000000000000000000
00000001000000000000000000000000000000000000000000000000000000000000000000000000
00000000100000000000000000000000000000000000000000000000000000000000000000000000
00000000010000000000000000000000000000000000000000000000000000000000000000000000
--------------------------------------------------------------------------------
11111111100000000000000000000000000000000000000000000000000000000000000000000000
00000000011111111100000000000000000000000000000000000000000000000000000000000000
00000000000000000011111111000000000000000000000000000000000000000000000000000000
10000000010000000000000000000000000000000000000000000000000000000000000000000000
01000000001000000010000000000000000000000000000000000000000000000000000000000000
00100000000100000001000000000000000000000000000000000000000000000000000000000000
00010000000010000000100000000000000000000000000000000000000000000000000000000000
00001000000001000000010000000000000000000000000000000000000000000000000000000000
00000100000000100000001000000000000000000000000000000000000000000000000000000000
00000010000000010000000100000000000000000000000000000000000000000000000000000000
00000001000000001000000010000000000000000000000000000000000000000000000000000000
00000000100000000100000001000000000000000000000000000000000000000000000000000000
--------------------------------------------------------------------------------
10001000100000000000000000000000000000000000000000000000000000000000000000000000
00010000011000000000000000000000000000000000000000000000000000000000000000000000
00100010000000000000000000000000000000000000000000000000000000000000000000000000
00000010000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00111000000000000000000000000000000000000000000000000000000000000000000000000000
00000000010000000000000000000000000000000000000000000000000000000000000000000000
00000001101000000000000000000000000000000000000000000000000000000000000000000000
11000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
11111001111000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
I need to read this file in columns, ignore '-------------------------' line. And store into
For example: this file has format 12 rows x 80 columns.
I need to read it with format 80x12, then store those data in a vector.
Appreciate it.
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 3 images