So I need to add a character to the end and beginning of a string read into the cmd line and compare that to the word file that is a dictionary set of all words possible. I have the logic for that done.
My problems: When nothing is entered to the cmd line than the program simply closes
I tried to fix this when initializing the string "guess" at the beginning with an if-else statement but it didn't help.
I get an out of bounds for my subscript but the program still runs after ignoring it.
When the command line is empty, the value of argc will be 1. In that case, looking at the contents of argv[1] makes no sense, as it doesn't exist.
So first check argc == 2