1) Read all the integers from a provided specialNumbers.txt file into a vector object 2) Sort the vector 3) Write the sorted numbers (one per line) to another file named sortedNumbers.txt You can do this in one file entirely in main() without building a class.        2220 9141 8599 8781 -213 6958 8125 -672 -439 5909 8653 8704 8042 9085 241 9941 7289 -455 3149 6733 9103 3529 9731 7109 4346 5182 6480 -379 6944 -568 8312 5906 8716 138 9952 8156 3648 352 4051 3694 2268 7387 2169 7788 7836 4147 2293 7861 3253 8138 356 9190 8034 3450 5361 435 5247 1792 2702 3563 4783 6774 1232 341 2455 8893 8681 7358 3811 -679 -57 251 5644 1688 1866 6219 1342 9022 6579 2647 7984 8159 4491 6502 9798 4486 3230 8796 2077 3423 6227 9953 9196 8315 6611 2691 467 8963 1510 2117 7450 2450 3067 402 2170 6377 5179 1582 5838 8369 7417 8329 3659 8849 -528 1134 7644 150 9505 9904 3400 5514 4109 7215 2428 -352 3017 841 -682 -239 2643 7055 1462 582 5250 5671 6186 981 7411 9132 4941 6058 1415 312 2412 3514 1025 8534 -322 2975 5762 -73 4612 3939 53 2231 4410 9338 5690 2612 721 5846 4242 7663 9133 1935 3703 5740 713 8068 1064 624 6909 6799 4574 1847 6090 273 4788 1133 831 1888 6654 -705 7002 9451 588 1578 132 6309 1012 9245 147 489 7079 8876 8446 9577 780 6450 9464 4046 2299 1967 6864 2980 9110 177 1123 3262 6492 4722 92 -602 7913 747 5398 4066 885 -772 6050 3184 6057 -715 9332 9341 -76 1744 6491 1923 3607 3036 5169 5844 9766 6928 1927 4346 5662 -486 6256 326 5516 2994 4916 1655 -511 6090 590 1058 8894 9153 7051 1369 3235 6196 142 5936 5308 8642 3641 5369 985 7555 9498 784 4348 9317 493 4889 8897 8314 4070 8399 3546 2214 5815 6624 9685 1249 3353 1279 1480 6398 4842 836 8357 5898 5532 7697 1954 3054 3886 4563 1776 7987 6517 759 -828 4508 1175 9545 6865 6639 2984 770 2976 7706 2574 6306 1939 3166 -222 -935 8876 2681 8753 2541 6586 812 8498 5848 9643 1411 3049 4824 7470 5636 3815 8763 7448 1676 9378 2028 691 2407 -2 8089 1217 -622 2972 3847 -771 9359 7531 8267 6395 1915 7316 8205 -513 9617 9461 3094 5493 3092 9898 5770 4450 8766 956 9005 9079 8347 6575 3028 7276 7647 8501 9576 7340 8714 -593 2909 5248 5694 -915 8879 9588 -964 2356 1762 5268 5124 8795 6226 4743 616 8112 5722 3858 -170 4382 9438 836 1011 4726 137 9032 512 1241 8251 7423 8511 4810 6449 5860 2561 -521 9667 4637 -544 8841 8854 6805 9864 3857 -62 8603 3173 8333 6238 3755 2144 1489 2939 7615 9452 6220 9085 4267 8824 2752 5814 2529

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter16: Searching, Sorting And Vector Type
Section: Chapter Questions
Problem 24SA
icon
Related questions
Question

1) Read all the integers from a provided specialNumbers.txt file into a vector object
2) Sort the vector
3) Write the sorted numbers (one per line) to another file named sortedNumbers.txt
You can do this in one file entirely in main() without building a class.       

2220 9141 8599 8781 -213 6958 8125 -672 -439 5909 8653 8704 8042 9085 241 9941 7289 -455 3149 6733 9103 3529 9731 7109 4346 5182 6480 -379 6944 -568 8312 5906 8716 138 9952 8156 3648 352 4051 3694 2268 7387 2169 7788 7836 4147 2293 7861 3253 8138 356 9190 8034 3450 5361 435 5247 1792 2702 3563 4783 6774 1232 341 2455 8893 8681 7358 3811 -679 -57 251 5644 1688 1866 6219 1342 9022 6579 2647 7984 8159 4491 6502 9798 4486 3230 8796 2077 3423 6227 9953 9196 8315 6611 2691 467 8963 1510 2117 7450 2450 3067 402 2170 6377 5179 1582 5838 8369 7417 8329 3659 8849 -528 1134 7644 150 9505 9904 3400 5514 4109 7215 2428 -352 3017 841 -682 -239 2643 7055 1462 582 5250 5671 6186 981 7411 9132 4941 6058 1415 312 2412 3514 1025 8534 -322 2975 5762 -73 4612 3939 53 2231 4410 9338 5690 2612 721 5846 4242 7663 9133 1935 3703 5740 713 8068 1064 624 6909 6799 4574 1847 6090 273 4788 1133 831 1888 6654 -705 7002 9451 588 1578 132 6309 1012 9245 147 489 7079 8876 8446 9577 780 6450 9464 4046 2299 1967 6864 2980 9110 177 1123 3262 6492 4722 92 -602 7913 747 5398 4066 885 -772 6050 3184 6057 -715 9332 9341 -76 1744 6491 1923 3607 3036 5169 5844 9766 6928 1927 4346 5662 -486 6256 326 5516 2994 4916 1655 -511 6090 590 1058 8894 9153 7051 1369 3235 6196 142 5936 5308 8642 3641 5369 985 7555 9498 784 4348 9317 493 4889 8897 8314 4070 8399 3546 2214 5815 6624 9685 1249 3353 1279 1480 6398 4842 836 8357 5898 5532 7697 1954 3054 3886 4563 1776 7987 6517 759 -828 4508 1175 9545 6865 6639 2984 770 2976 7706 2574 6306 1939 3166 -222 -935 8876 2681 8753 2541 6586 812 8498 5848 9643 1411 3049 4824 7470 5636 3815 8763 7448 1676 9378 2028 691 2407 -2 8089 1217 -622 2972 3847 -771 9359 7531 8267 6395 1915 7316 8205 -513 9617 9461 3094 5493 3092 9898 5770 4450 8766 956 9005 9079 8347 6575 3028 7276 7647 8501 9576 7340 8714 -593 2909 5248 5694 -915 8879 9588 -964 2356 1762 5268 5124 8795 6226 4743 616 8112 5722 3858 -170 4382 9438 836 1011 4726 137 9032 512 1241 8251 7423 8511 4810 6449 5860 2561 -521 9667 4637 -544 8841 8854 6805 9864 3857 -62 8603 3173 8333 6238 3755 2144 1489 2939 7615 9452 6220 9085 4267 8824 2752 5814 2529  

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 4 images

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning