I have a bunch of names in a data file. One name, first and last, per line.
How can I open up the file, read them, and then print them to the screen?
I have a bunch of names in a data file. One name, first and last, per line.
How can I open up the file, read them, and then print them to the screen?
What have you tried?
My best code is written with the delete key.
I'm kind of a newbie and I've been searching through my book and can't figure out how to do it.
Use ifstream. http://www.cprogramming.com/tutorial/lesson10.html
dwk
Seek and ye shall find. quaere et invenies.
"Simplicity does not precede complexity, but follows it." -- Alan Perlis
"Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
"The only real mistake is the one from which we learn nothing." -- John Powell
Other boards: DaniWeb, TPS
Unofficial Wiki FAQ: cpwiki.sf.net
My website: http://dwks.theprogrammingsite.com/
Projects: codeform, xuni, atlantis, nort, etc.