suppose the input file is...
5(number of cells)
1 2 -1 4
0 2 3 4
1 0 3 -1
2 -1 3 1
2 0 1 -1
how will i Write a function to read data from an input file to create a dynamic array of pointers to cells, create the required number of cells one by one, store their addresses at the corresponding index in the array. Then fill the data (given in the input file) in each cell.
M^2
0
Newbie Poster
Recommended Answers
Jump to PostIt would be helpful to know what those numbers mean.
Jump to PostIf the first number is a cell number why are there duplicates ?
>>and says that door 1 leads to cell 1
There is no 1 on line 2.0 2 3 4
Jump to PostSo are you saying you just made up those numbers? You need to post some actual rows out of a real file.
The way I understand it, the first number is a cell number, second through fourth numbers are door numbers (three doors) and the value of the numbers …
All 9 Replies
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
M^2
0
Newbie Poster
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
M^2
0
Newbie Poster
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
M^2
0
Newbie Poster
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
M^2
0
Newbie Poster
M^2
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.