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
Assigning a value from a file to a 2d ar
Assigning a value from a file to a 2d array
Apr 24, 2012 at 4:13pm UTC
Hurl91
(1)
I have two text files to read from.
The first has the size of the 2d array.
The second has the values to be assigned to the 2d array.
Not sure where to start it.
Apr 24, 2012 at 4:23pm UTC
Peter87
(11254)
You can use std::ifstream to read data from the file.
1. First read the size of the 2D array.
2. Create the 2D array with the correct size.
3. Read the value to the 2D array.
Topic archived. No new replies allowed.