Hello kingjames6,
I have been trying to figure out your program all day. The instructions are not complete enough to help and the code helps even less.
I am having a hard time figuring out what the delay is for and where to put it.
The more I try to figure out how to fix what you have the more I come to the conclusion that it would be best to start over. I will do that tomorrow and see what I can come up with.
If you have not already done so it would be best to start with paper and pencil to write down your idea of what the program needs to do. Back when I was in school a flow chart was emphasized more than pseudo code, but either one will work to express your ideas.
Some ideas I have:
I do not know if a struct is required, but for one player you can just as easily define the variables in "main". If some day you intend to expand to two or more players the struct would have more use.
You have a series if if statements that are repeated three times. This is a good candidate for a function. But there are ways around that too.
The variables names are good for the most part. "num" could have a better name that is more descriptive of what it is. Although you can do with out it "j1" gives no idea what it is. "player" or "player1" would be better.
Your "srand" works, but it is not the best way to write it:
srand(static_cast<size_t>(time(nullptr)));
. When you look up "srand"
http://www.cplusplus.com/reference/cstdlib/srand/?kw=srand you will find that the parameter needs to be an "unsidned int", but "time" does not return an "unsigned int", so it needs to be type cast. For "time()" although zero (0) or "NULL" work "nullptr" is the better choice.
http://www.cplusplus.com/reference/ctime/time/
Starting with line 107 you have four if statements that contain
sequence = sequence + 'a';
with the letter changing in the three following if statements. The "=" will replace anything that may be in "sequence" with a single letter. What you want is
sequence += 'a';
. This will add tot he string nor replace. And the same for the other if statements.
Another thing I was thing about is the "level of difficulty". When dealing with the number for the delay you might consider setting a variable to limit how many letters are used for each level.
I will think on this tonight and work on a new idea for the program tomorrow.
Hope that helps,
Andy