1613-3-傅溥衍 总结《2016年11月18日》【连续四十九天总结】

    xiaoxiao2021-11-30  19

    标题:继承 关键词:this函数 内容:  A今日完成情况

    1. this函数100%

    B具体内容

     this函数

    #include<iostream> using namespace std; class Test { int x; public: Test(int=0); void print(); }; Test::Test(int a){x=a; } void Test::print() { cout<<" x= "<<x<<endl; cout<<"this->x= "<<this->x<<endl; cout<<"(*this).x="<<(*this).x<<endl; } int main() { Test testObject(666); testObject.print(); return 0; }

    C明日计划

    A 人类设计

    B 为什么需要继承

    转载请注明原文地址: https://ju.6miu.com/read-679188.html

    最新回复(0)