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
?
Thanks
warneseyAsked:
Who is Participating?
 
mrwad99Connect With a Mentor Commented:
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...

0
 
warneseyAuthor Commented:
Hey. Thanks a bunch. Really helped and now i gottit working :)
Cheers
0
 
mrwad99Commented:
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.

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.