cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
help with minor blackjack program
help with minor blackjack program
Dec 5, 2012 at 4:41pm UTC
random132
(3)
greetings
i've got a problem with my program, when the winner is announced, it says that both players have won, and i can't figure out why.
here's the code:
http://codepad.org/nhO6cqZn
it should be something in the while-loop, but i just can't put my finger on it.
any help would be appreciated.
Dec 5, 2012 at 5:10pm UTC
whitenite1
(1785)
@random132
I believe
rand
is a keyword, and cannot be used as a variable in your program.
rand=rand%13;
Try changing the variable
rand
to something else, like
rand_card
maybe.
Dec 5, 2012 at 5:29pm UTC
random132
(3)
hi, that wasn't the problem, but i managed to figure it out, thanks anyway! =)
Topic archived. No new replies allowed.