cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
How can I read from a text file to deter
How can I read from a text file to determine the size of an array?
Mar 26, 2018 at 11:09pm UTC
joshgarza
(21)
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
Mar 27, 2018 at 3:00pm UTC
dhayden
(5798)
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.
Mar 29, 2018 at 8:02am UTC
Helegurbann
(156)
http://www.cplusplus.com/doc/tutorial/files/
Topic archived. No new replies allowed.