zoukankan      html  css  js  c++  java
  • 666

    #include <iostream>
    #include <iomanip>
    #include <cstring>
    #include <cmath>
    #include <string.h>
    
    using namespace std;
    
    class Test
    {
    private:
        int x;
    public:
        const Test operator+(Test t){return *this;}
        Test& operator+(Test t){return *this;}
        //返回值不可修改
        //对自己本身进行修改
        //返回值可做左值
        Test operator+(Test t)const{}
        //本身对象是不可修改的
        //const是加在*this上面的
        Test operator+(const Test t){}
        //传入的算子不能改变
        ++a
        const Test& operator++(){ }
        a++
        const Test operator++(int){}
    };
    
    int main()
    {
        +-*/
        const T operator-(const T)const{}
        !&&
        bool operator!(const T)const{}
        []
        T& operator[](int index){}
        
    }
    

      

  • 相关阅读:
    leetcode 414
    Leetcode 495
    Leetcode 485题
    Python 24点(2)
    python 24点
    我的第一次作业
    Django
    multiprocessing模块
    遍历文档树
    shutil模块
  • 原文地址:https://www.cnblogs.com/-Asurada-/p/10770841.html
Copyright © 2011-2022 走看看