-1
I need to read a large ". txt" file and its contents are in the following format:
1 12
1 13
2 5
2 6
I would like to know if it is possible to read the value of each column and store it in a list, for example:
Ler "1"
Armazenar o "1" numa lista
Ler "12"
Armazenar 12 numa lista
ler "1"
Armazenar "1" na lista
ler "13"
Armazenar 13 na lista
...
And so on and so forth
Which C++ library are you using to read the txt file? The logic of this is basically: read the whole file, play in a string, split it into an array to identify the elements of the lists and then go through this array distributing elements.
– M. Bertolazo