File: name_pairs.cpp

package info (click to toggle)
cgal 4.9-1
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 85,584 kB
  • sloc: cpp: 640,841; ansic: 140,696; sh: 708; fortran: 131; makefile: 114; python: 92
file content (20 lines) | stat: -rw-r--r-- 639 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#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");
    CGAL::Combination_enumerator<vector<string>::iterator>
        combi(2, names.begin(), names.end());
    while( ! combi.finished() ) {
        cout << " {" << *combi[0] << ' ' << *combi[1] << '}';
        ++combi;
    }
    cout << endl;
    return EXIT_SUCCESS;
}