Strings
std::string
has a fill constructor following the form std::string(size_t n, char c)
. This constructs a string with the character c
of the length n
.
// stars = "*****"
std::string stars(5, '*');
Your task is to create a program which takes a name input and frames it in asterisks (*
).
tom
*******
* *
* tom *
* *
*******