备份

#include 
#include 
#include 
#include 
#include 
#include 

using namespace std;
struct fruit{
string name;
int price;
}f1,f2,f3;
struct cmp{
 bool operator()(fruit f1,fruit f2){
     return f1.price>f2.price;
 }
};
bool cmp1(string s1,string s2){

return s1>s2;
}
int main()
{
    priority_queue, greater > q;
    q.push("1233");
    q.push("1243");
    printf("%s",q.top().c_str());
    cout<>str;
    printf("%s",str.c_str());
    string  str1="123456";
    reverse(str1.begin(),str1.begin()+str1.length());
    printf("%s",str1.c_str());
    priority_queue ,cmp> p;
    f1.name="11";
    f1.price=1;
    f2.name="22";
    f2.price=2;
    f3.name="33";
    f3.price=3;
    p.push(f1);
    p.push(f2);
    p.push(f3);
   cout<>s2[i];
   }
   int len=sizeof(s2)/sizeof(s2[0]);
   cout<

你可能感兴趣的:(c++)