How can I read from a text file to determine the size of an array?

I am supposed to read from a .txt file to determine the number of rows and columns I need for my program. However, I don't know how to do this which is why I am posting in this forum.

Here is the code:
https://pastebin.com/TSYH26Ci

This is the assignment if anyone is curious:
https://faculty.utrgv.edu/robert.schweller/CS2380/homework/hw10.pdf
Just read the file as a vector of strings. After reading it, you may find it convenient to append spaces to lines that are shorter than the max.
Topic archived. No new replies allowed.