You will need to develop a C++ program that removes whitespace characters from an input string. You will need to create a function str_cleanup() that takes a parameter of string type as the input and returns the modified string with whitespace characters (tabs/spaces) removed. As an example, your program execution should look like this: Enter a string: Hello World, Happy Holidays! The output string is: HelloWorld,HappyHolidays! You are not allowed to use any built-in library functions to remove whitespaces. Hint: A string is an array of characters. You can work with a string object as if it was a character-array
You will need to develop a C++ program that removes whitespace
characters from an input string. You will need to create a function str_cleanup() that takes a
parameter of string type as the input and returns the modified string with whitespace
characters (tabs/spaces) removed. As an example, your program execution should look like this:
Enter a string: Hello World, Happy Holidays!
The output string is: HelloWorld,HappyHolidays!
You are not allowed to use any built-in library functions to remove whitespaces.
Hint: A string is an array of characters. You can work with a string object as if it was a
character-array
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 3 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Thank you so much, this makes sense going through it! I just have one more question about functions that I'm still a bit confused about. What is the difference between user-defined functions vs built-in library functions?
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)