cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
Reading from a .txt file
Reading from a .txt file
Jan 5, 2014 at 4:00pm UTC
Binarydude87
(25)
If I am reading data from a .txt file with a person's last name and first name (e.g. Miller Andrew), How do I output the same data with the first name followed by the last ?(e.g. Andrew Miller) Do I use the ignore function?
Jan 5, 2014 at 4:22pm UTC
Null
(956)
1
2
3
4
5
string first_name,last_name; file >>last_name>>first_name; cout <<first_name<<
" "
<<last_name;
Jan 5, 2014 at 8:41pm UTC
Binarydude87
(25)
Lmao! Wow. I was just over thinking it. That was so simple. Thank you for your help!
Topic archived. No new replies allowed.