cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
Selection of 5 points from n points or n
Selection of 5 points from n points or nC5
Jan 28, 2010 at 3:24pm UTC
dps
(1)
I want to select 5 points from n given points exhaustively. in other words i want to do nC5 in C++ but not getting a simple solution for this. Please reply with a solution
Jan 28, 2010 at 3:33pm UTC
mcleano
(922)
Can you elaborate please? This isn't enough information.
Jan 28, 2010 at 7:42pm UTC
jsmith
(5804)
If you want permutations, you can use std::next_permutation. If you want combinations, you need
to write the code yourself.
Topic archived. No new replies allowed.