• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 228
  • Last Modified:

Getting a set of numbers from a file to cin >>

Hi. I've just started C++ recently and i want to know how to get the data from a file into the program to store it as a char.
I can open the file and make it show the contents in dos when running my console, however, i want to be able to use this in a cin >>. I have tried to place "cin >>" after the data is inputted, but this doesn't work.

Any help
  • 2
1 Solution
If you spend 10 minutes reading http://www.cs.hmc.edu/~geoff/classes/hmc.cs070.200401/notes/io.html you will be able to answer your own question as well as many more about file I/O that you may have...

warneseyAuthor Commented:
Hey. Thanks a bunch. Really helped and now i gottit working :)
Glad the link helped.

If there is nothing else that can be helped with then you need  to close this question to prevent annoying the moderators who have to clean up ungraded questions and possible negative feedback.


Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now