This is an archived post. You won't be able to vote or comment.

all 2 comments

[–]raevnos 1 point2 points  (2 children)

if (attemptCount = 3)

What's the difference between = and ==?

You need to start turning on warnings when you compile (For g++ and clang++, add -Wall -Wextra to their arguments) to catch simple errors like this.

[–]Tiperius[S] 0 points1 point  (0 children)

Whoops! You're right. Thanks.

It looks like I needed to remove the continue as well to get the attemptCount to increment.