So I added this little bit at the end here because why not, it added a bit of “je ne sais quoi.” However visually it is not sitting right with me…
Suggestions?
// I could set up [string complement = “your code is a work of art.”] and then reference that within the the string complement(). But that still feels like its extra steps…
I’m not sure either. I think what is most disconcerting is the whole line of text after the return, it seems repetitive to have “your code is a work of art.” twice within the function.
Isn’t cout’s purpose to display said text unto the screen? Or should it just be return?
I think what I am inquiring into is the “return” and various ways to end it. Let me get back to you on this once I try to recreate my initial error and see if I can elaborate on my concern.
A cleaner way is to convert your compliment method from returning a string to return void (nothing). This would still run the cout in the method and print out the compliment but you wouldn’t need to have the return statment in there.