I have 2 string, from Sqlite3 , ColName and Value. I want to save each pair of values, i dont know the quantity of ColName/Value , so i use vector.
is there a way so i can create/push a ColName/Value to the vector of an array
code:
std::vector<std::string[3]> colNameAndValueList;//this doesnt work
string colName="ID";
string value="122001";
colNameAndValueList.push_back(std::string(colName,value));//im lost here
i dont know if i should use hash or struct, can anyone give me an advice?
thanks.
std::pairas instd::vector<std::pair<std::string, std::string>>.