| | |
Rearranging and Sorting C strings.
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Dec 2007
Posts: 1
Reputation:
Solved Threads: 0
Hello, so I'm a student in college and I'm new with C++ and I'm trying to make this program that allows me to read in names from a file, first name then last name, in Cstrings. Then I have to change it so that the output is "lastname, firstname". There are 7 names but the program is supposed to work whether there are 7 names or 25 names.
The program also must sort all the names so that they are in alphabetical order, then print them to another file.
I am only allowed to use one array as well.
I've tried a couple different ways but no matter how I do it I just can't seem to get it to work. Anyone have any suggestions on the route I should take in order to get this done? For some reason this one is just perplexing me.... I'm probably just over thinking it but any assistance would be greatly appreciated.
Thanks!
The program also must sort all the names so that they are in alphabetical order, then print them to another file.
I am only allowed to use one array as well.
I've tried a couple different ways but no matter how I do it I just can't seem to get it to work. Anyone have any suggestions on the route I should take in order to get this done? For some reason this one is just perplexing me.... I'm probably just over thinking it but any assistance would be greatly appreciated.
Thanks!
![]() |
Similar Threads
- sorting arrays (Java)
Other Threads in the C++ Forum
- Previous Thread: Wrong method for parsing character seperated values?
- Next Thread: String Input & Output
| Thread Tools | Search this Thread |
Tag cloud for C++
api application array arrays based beginner binary bmp c++ c/c++ calculator char char* class classes code compile compiler console conversion convert count data delete deploy dll download dynamic dynamiccharacterarray email encryption error file format forms fstream function functions game givemetehcodez graph gui homeworkhelp iamthwee ifstream input int java lib library linker list loop looping loops map math matrix memory microsoft newbie news number numbertoword output pointer problem program programming project python random read recursion recursive reference rpg simple sorting string strings struct temperature template templates text text-file tree url variable vector video visual visualstudio void win32 windows winsock wordfrequency wxwidgets






