米脂
123456789101112131415161718192021222324252627include <vector>#include <iostream>using namespace std ;typedef struct Data{ unsigned char idrecord[11]; //id unsigned char ctype[7]; //type unsigned int od; unsigned char id;} data_t ; //这个类型要定义成全局的!int main(){ data_t d[]={ { "111","10",1,11}, { "222","11",2,22}, { "333","12",3,33} }; vector <data_t> vst ; int i; for( i=0;i<3;i++ ) vst.push_back( d[i] ); for( i=0;i<3;i++ ) { cout << vst[i].idrecord <<endl; } return 0;}