Let's say there's list of numbers like this saved in a txt file:
4 6 3 4 5
How do I put it into an array?
JTX
0
Newbie Poster
Recommended Answers
Jump to Posthttp://www.cplusplus.com/doc/tutorial/files/
Get any previously unanswered probs, just ask.
Jump to PostHow would assign a value to an element of the array?
Pretty much the same you assign a value to a plain int.
Your loop is fine, if you know exactly how many values are in the data file, and that number is the size of the array. …
All 7 Replies
VilePlecenta
39
Junior Poster
JTX
0
Newbie Poster
JTX
0
Newbie Poster
vmanes
1,165
Posting Virtuoso
JTX
0
Newbie Poster
vmanes
1,165
Posting Virtuoso
JTX
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.