Added stl example.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4602 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
5393751256
commit
2949c006d4
4 changed files with 68 additions and 0 deletions
15
SWIG/Examples/ocaml/stl/example.h
Normal file
15
SWIG/Examples/ocaml/stl/example.h
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
/* File : example.h -- stolen from the guile std_vector example */
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
#include <numeric>
|
||||
|
||||
double 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() );
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue