Transferring variables with object referance. With or without &?

后端 未结 0 568
忘掉有多难
忘掉有多难 2021-01-31 00:40
#include 
class class1
{
public:int number = 2;
};

class class2
{
public:
    void method(class1 &obj)
    {
        obj.number;
        std::cout &         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题