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:
Art Yerkes 2003-03-21 16:25:30 +00:00
commit 2949c006d4
4 changed files with 68 additions and 0 deletions

View 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() );
}