I am trying to get each elemnt of a text file with 13 integers in one line, each seperated by a space, into each slot of an array, any idea how to do this?
robjackstewart
0
Newbie Poster
Recommended Answers
Jump to Postif each number has a space after it you can just use the
>>
operator of theifstream
object your using inside of a loop.
Jump to PostHow far along are you?
Are you having troubles opening the text file? Reading the file? Creating the array? Putting the data into the array? etc.?
All 8 Replies
NathanOliver
429
Veteran Poster
Featured Poster
DavidB
44
Junior Poster
robjackstewart
0
Newbie Poster
robjackstewart
0
Newbie Poster
NathanOliver
429
Veteran Poster
Featured Poster
DavidB
44
Junior Poster
tinstaafl
1,176
Posting Maven
ravenous
266
Posting Pro in Training
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.