I'm trying to prompt an error message stating that when the user puts nothing into "lotName," it will spit out an error message. The error messages are stored as a function, but I'm not quite sure how to pull it out. Would I need an if statement here?
I see that lotName is a single char in your code (and a char pointer to random memory in ihato's code, which is also bad, although he does explain at the top of his post that it's not good). This is a fantastically bad idea if you want to store a C-string in it. It won't work. You will stomp all over memory that isn't yours.
I suggest you stop trying to use C-strings and use a proper C++ string.