前后缀 自增自减重载

#include<bits/stdc++.h>
using namespace std;
struct node{
    int y,m,d;
    node operator++(int ){
        //后缀加加 ++i
        node nd = *this;//保存副本
        pluss();
        return nd;
    }
    node& operator++(){
        //前缀加加 ++i
        pluss();
        return *this;
    }
};
signed main(){
    return 0;
}

 

posted @ 2019-10-07 19:38  Unknown_Island  阅读(161)  评论(0)    收藏  举报