subject

Write a C++ program to do the following: Load up an array of names from the files names. data
Assigns integer id's to each name, starting at 1001, and in the order in which they are read from the file (so the first name would be assigned 1001, the second 1002, etc)
We don't have classes yet, so use parallel arrays, i. e., two arrays of the same capacity, the first containing the names, the second the corresponding id
Sort the arrays by name
Write the sorted data to the file results. data, each name / id pair on a separate line
Sample Test Run #1
For example if the file names. data contains:
Langsam
Tenenbaum
Arnow
Weiss
Cox
upon program termination, the console output should be:
5 records processed.
the file results. data should contain:
Arnow 1003
Cox 1005
Langsam 1001
Tenenbaum 1002
Weiss 1004
and the exit code should be 0.
Sample Test Run #2
If the file names. data did not exist, the console output should be:
*** Exception *** input file names. data not found
and the exit code should be 1.
Sample Test Run #3
If the file names. data contains more than 50 names, the console output should be:
*** Exception *** array capacity exceeded
and the exit code should be 1.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 02:30
These factors limit the ability to attach files to e-mail messages. location of sender recipient's ability to open file size of file type of operating system used
Answers: 2
question
Computers and Technology, 23.06.2019 05:00
In cell b18, enter a formula to calculate the amount budgeted for meals. this amount is based on the daily meal allowance and the total travel days (# of nights+1).
Answers: 1
question
Computers and Technology, 23.06.2019 10:00
Hey i just logged on and one of the moderators deleted a bunch of my answers to questions, even though the answers were right and the people it doesn't make sense but if anyone wants to talk about anything just message me lol (this is super random lol)
Answers: 1
question
Computers and Technology, 23.06.2019 11:30
Which excel file extension stores automated steps for repetitive tasks?
Answers: 1
You know the right answer?
Write a C++ program to do the following: Load up an array of names from the files names. data
...
Questions
question
Social Studies, 29.06.2019 09:00
question
Geography, 29.06.2019 09:00
Questions on the website: 13722360