X
X
Xveeder2018-07-25 18:18:23
C++ / C#
Xveeder, 2018-07-25 18:18:23

How to store an array of elements, each element of which consists of 2 elements associated with it?

Good afternoon. A file comes to the program, it consists, for example, of the lines ala:
login1; password1
login2; password2
login3; password3
login4; password4
You need to put these lines into a dynamic array so that each element of this array contains 2 separate cells, with a login and a password, for example like this:
array[0][0] //login1
array[0][1] //password1
array[1][0] //login2
array[1][1] //password2
array[2][0] / /login3 array
[2][1] //password3
such array cells can be 2-3-4 thousand.
It only comes to mind to create a collection of structures with this data. But it seems to me that creating several thousand structures and calling them would be expensive.
Thank you.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question