In this exercise I am using Visual Studio 2017 and the std_lib_facilities header provided by Stroustrup.
5. Write a function, string cat_dot(const string& s1, const string& s2), that concatenates two strings with a dot in between. For example, cat_dot("Niels", "Bohr") will return a string containing Neils.Bohr.
6. Modify cat_dot() from the previous exercise to take a string to be used as the seperator (rather than the dot) as its third argument.
He did these two chapter 4 style exercises to make the next one tedious as hell. I don't want to implement this with pointers and arrays and no standard library lol.
No comments:
Post a Comment