Hey guys,

Im still new to programming and need help with something. I need to read a line of numbers from a text file into an array.
I will be given this in a text file and need to store them in an array for later use.

0 1 2 3 4 5

Thanks
-Basketball4567

From your post it appears that you're relatively new to programming. Have you harnessed the power of Google?

Have you tried searching Google with the terms:

-"Read File C++"
-"Read File Line by Line C++"
-"C++ Reading Files"

As programmers it is impossible for us to know how to do everything and anything with a language just in our heads. If you're having an issue 95% of the time someone has asked or written a tutorial showing you how to do a task.

No offense but have you read the book? and perhaps it could show you how to do exactly that. If you have specific part where you are stuck, that is not obvious, please feel free to come back. :)

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.