I'm trying to read a file with unknown number of rows and 4 columns of string and int into a array. I'm not really sure how that would work... could someone give me an idea of how to do it, or an example? Thanks.
1- create a class Row with 4 properties (string). Each object of this class is a row.
2 - in the core of the main fonction, create a list<Row*>
3 - read the file line by line and push a new object in the list for each line in the file.
It is not a array, but a list of Row.
If You absolutly need to have an array, I would read the file a first time to get its size, then I would dim a array and fill it in a loop.
In that example, I used 100 as the maximum number of rows. If that is not enough you can easily change the MAX_ROWS constant. If you don't know the maximum number of rows, then use a std::vector.