to add one record to the vector you can use
Code:struct Record { int index; std::string boy; std::string girl; }; Record temp ={1,"Henry", "Wilma"}; std::vector<Record> list; list.push_back(temp); std::cout << list[0].index << " " << list[0].boy << " " << list[0].girl << std::endl;