Issue with PlayGame loop and difficulty function

Goodmorning all, i’m just inquiring about an issue im having with my Triple X game.
As i’ve added the Difficulty function into my strings and functions my game has ceased to continue replaying, however i don’t see any error in the code.
Hope it goes without saying but i’m fairly new to C++.


image

1 Like

From the code you provided it looks like you got some trouble with curly braces. Now you return 0 at the end of first while loop iteration instead of at the end of main function. Try correctly indenting your code and you will see it.

BTW, you can just copy and paste your code here instead of making screenshots, but don’t forget to wrap it in 3 backtick characters ```, e.g.,

```
my multiline
code
```

becomes

my multiline
code
2 Likes

It worked, Thank you so much for helping me deal with my very simple issue.
from now on i will always double check the curly brace indentations!

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms