From: William S F. <ws...@fu...> - 2009-07-18 22:36:22
|
Xin Shuai wrote: > Hello: > > My problem is how to initiate template like this---- > std::vector<std::pair<int,int>> > > I tried two ways: > one is > %template(v) std::vector<std::pair<int,int>>; > > and the *syntax error* message emerge. > You need a space between '>>'. > > the other is > %template(p) std::pair<int,int>; > %template(v) std::vector(p); > > But anther error message come out: *p is nod declared in the scope* > That just isn't valid syntax. Try %template(p) std::pair<int,int>; %template(v) std::vector< std::pair<int, int> >; William |