\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \) \( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \) \( \def\ccSum #1#2#3{ \sum_{#1}^{#2}{#3} } \def\ccProd #1#2#3{ \sum_{#1}^{#2}{#3} }\)
CGAL 4.11.2 - Geometric Object Generators
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Generator/name_pairs.cpp
#include "CGAL/Combination_enumerator.h"
#include <iostream>
#include <vector>
using namespace std;
int main()
{
vector<string> names;
names.push_back("Sun"); names.push_back("Shannon");
names.push_back("Hurley"); names.push_back("Sawyer");
names.push_back("Kate"); names.push_back("Claire");
names.push_back("John"); names.push_back("Jack");
combi(2, names.begin(), names.end());
while( ! combi.finished() ) {
cout << " {" << *combi[0] << ' ' << *combi[1] << '}';
++combi;
}
cout << endl;
return EXIT_SUCCESS;
}