In this exercise I am using Visual Studio Community 2017 and the header file "std_lib_facilities.h" which can be found here:
http://www.stroustrup.com/Programming/PPP2code/std_lib_facilities.h
http://www.stroustrup.com/Programming/PPP2code/std_lib_facilities.h
Chapter 10 // Exercise 8
Write a program that takes two files containing sorted whitespace separated words
and merges them, preserving order.
and merges them, preserving order.
At first I completely missed the word "sorted" and thought this was the exact same exercise as the on before. After that I changed the program slightly to output every word into a vector and then sorted it; outputting it back into another file. Easy peasy.
No comments:
Post a Comment