|
From: | Gabriel Nützi |
Subject: | Re: [Toon-members] Re: STL containers with TooN |
Date: | Mon, 11 Jan 2010 22:05:18 +0100 |
This code works: list<Vector<Dynamic,double> > la; la.push_back(makeVector(3,1,2,3,4)); la.push_back(makeVector(3,1,3,4)); la.push_back(makeVector(4,2,1,2,3,4)); la.push_back(makeVector(4,3,4)); la.push_back(makeVector(4,2,1,2,3,4,9,2,1)); la.push_back(makeVector(3,1,2,3,4)); la.push_back(makeVector(3,1,3,4)); la.push_back(makeVector(4,2,1,2,3,4)); la.push_back(makeVector(4,3,4)); la.push_back(makeVector(4,2,1,2,3,4,9,2,1)); list<Vector<Dynamic,double> >::iterator it; for(it = la.begin();it!=la.end();it++){ cout << *it <<endl; } advance(it,8); it = la.erase(la.begin(),it); cout <<"erase"<<endl; for(it = la.begin();it!=la.end();it++){ cout << *it <<endl; } but the code from Gerhard, gives the fallowing error (resizable works): /Users/gabrielnutzi/Desktop/TooNTest/TooN/internal/vbase.hh:96: error: no matching function for call to 'TooN::Internal::VectorAlloc<-0x00000000000000001, double>::VectorAlloc()' /Users/gabrielnutzi/Desktop/TooNTest/TooN/internal/allocator.hh:167: note: candidates are: TooN::Internal::VectorAlloc<-0x00000000000000001, Precision>::VectorAlloc(int) [with Precision = double] /Users/gabrielnutzi/Desktop/TooNTest/TooN/internal/allocator.hh:160: note: TooN::Internal::VectorAlloc<-0x00000000000000001, Precision>::VectorAlloc(const TooN::Internal::VectorAlloc<-0x00000000000000001, Precision>&) [with Precision = double] What is the difference in allocation when it comes to a resizable ? Thanks! Am 11.01.2010 um 18:09 schrieb Gerhard Reitmayr: vector<Vector<Dynamic> > v(10); // 10 dynamic vectors |
[Prev in Thread] | Current Thread | [Next in Thread] |