私は を持っておりmap<T,vector<double> >、T=char値は言うvector<double>とlength<n言うn=5. それぞれを map からlength を持つvector<double>bigに転送したいと思います。各ベクトルは index に挿入されます。可能であれば、これらすべてをコピーせずに。vector<double>n*mapsize5*k
#include <vector>
#include <map>
using namespace std;
int main()
{
    typedef vector<double> Vec;
    typedef map<char, vector<double> >::iterator ItMap;
    //create a map<char,vector<double>> with 2 keys holding resp 2-3 elem vectors
    double v_value[] = {1.1,2.4};
    Vec v(v_value, v_value + sizeof(v_value)/sizeof(double));
    map<char,vector<double> > myMap;
    myMap['A'] = v;
    v.push_back(10);
    myMap['B'] = v;
    //create the vector that should get all the small vectors
    Vec receipt;
    receipt.reserve(10);
    for(ItMap it = myMap.begin(); it != myMap.end(); ++it) {
        it->second.resize(5);
        receipt.insert(receipt.end(),it->second.begin(),it->second.end());
    }
}
編集:私は自分のソリューションで編集しましたが、コピーします。