Click here to Skip to main content
11,702,890 members (61,037 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as

Random extraction of 5 cards from a deck

, 26 Jan 2010 CPOL 11K 2
The question: "How can I extract 5 random cards from a deck?" (or similar), appears every now and then at the C/C++ forum.I use the following method:const int CARDS = 52;int card[CARDS]; // the 'card' array represents all of the cardsint i, deck_cards;// initializationfor (i=0;...



Compare Revision Minor Date Status Editor
3 - publicly available Yes 26-Jan-10 18:23 Available CPallini
1 No 26-Jan-10 18:23 Composing CPallini


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Software Developer (Senior) AEM S.p.A.
Italy Italy

Debugging? Klingons do not debug. Our software does not coddle the weak. Bugs are good for building character in the user.
-- The Klingon programmer

Beelzebub for his friends [^].

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.150819.1 | Last Updated 26 Jan 2010
Article Copyright 2010 by CPallini
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid