#include <string.h>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;

int main()
{
//vector<int>obj;
vector<int> obj;

obj.push_back(9);
obj.push_back(1);
obj.push_back(3);
obj.push_back(0);

//:wq
// cout<<"obj.begin()="<<obj.begin()<<endl;

sort(obj.begin(),obj.end());//从小到大

cout<<"从小到大:"<<endl;
for(int i=0;i<obj.size();i++)
{
cout<<obj[i]<<",";
}

cout<<"\n"<<endl;

cout<<"从大到小:"<<endl;
reverse(obj.begin(),obj.end());//从大到小
for(int i=0;i<obj.size();i++)
{
cout<<obj[i]<<",";
}
return 0;
}
从小到大:
0,1,3,9,

从大到小:
9,3,1,0,