Hello, everyone, I have a class composed by vectors,One of them is called order.
As well I have several functions to load the vector with information,the information of one board(the item I'm managing) is composed by:name,stock,order,day,month and year.
What I want to do is put away the order vector from largest to smallest, and do the same with the rest of them.I dont know how to do it
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
class bench{
private:
vector<string> name;
vector<int> stock;
vector<int> order;
vector<int> day;
vector<int> month;
vector<int> year;
public:
void CopyName(string boardname);
void CopyStock(int amountboard);
void ShowCopyName();
void ShowCopyStock();
void ShowNameBoard();
void ShowBoardStock(int a);
void CopyDate();
void CopyOrder();
int ShearchingMaximunOrder();
};
|
What I want to do is apply the same order to all vector that I have to apply to order:
I think doing this I could sort my vector
|
sort(order.begin(), order.end());
|
but,I dont know how to apply the same sort to the rest.
Thank you!!