Is this possible to store a structure in vector? If so, how? And, how to manipulate with it? I mean, how to use push_back() to add an item and how to use at() to read a member from it.Code:struct cart { int index; string pname; }; vector <cart> a;
Is this possible to store a structure in vector? If so, how? And, how to manipulate with it? I mean, how to use push_back() to add an item and how to use at() to read a member from it.Code:struct cart { int index; string pname; }; vector <cart> a;