aboutsummaryrefslogtreecommitdiff
path: root/Examples/ocaml/stl/example.h
blob: da1d50e224cdec69855838c43a3762b24f18e461 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* File : example.h -- stolen from the guile std_vector example */

#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <numeric>

using std::string;

void vec_write(std::vector<string> v) {
    int n = 0;
    for( std::vector<string>::iterator i = v.begin();
	 i != v.end();
	 i++ )
	printf( "%04d: %s\n", ++n, i->c_str() );
}