I can’t say if this would be a good or bad practice, but I had mine all on one line as well. I also didn’t get the solution completely correct without going forward in the video. I had the right idea, but I was trying to insert too much into it. Like int WORD_LENGTH, or std:: <<WORD_LENGTH…
After a few minutes of frustration, I was glad to see that I had the right idea.
I know this answer is two years late but maybe someone reading this now might find it useful.
Your answer is essentially the same as the solution provided. The compiler will concatenate two strings that are separated by << into one in its implementation.
I think Ben was just demonstrating the concept of whitespace, and the fact that unless you specify that you want things on a new line, C++ will just place the strings next to each other.