Question
In c++ Create a function called display_header that displays text surrounded by a rectangle composed of asterisks. The function receives a std::string text as input
In c++
Create a function called display_header that displays text surrounded by a rectangle composed of asterisks. The function receives a std::string text as input and does not return anything as an output, but displays the header. For example, given the text Hello World, the function should display this on screen:
**************** * Hello World! * ****************
Create another function called within_width that helps make sure that the header does not exceed the width of the screen. The function accepts two parameters: a std::string text that is the text input used for displaying the header, and an unsigned short int which is the maximum width of the screen. Typically, this is 80 characters, but this parameter makes it more flexible for the user. The function returns a bool value indi
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started