【单选题】对于下面定义的类A在函数f()中将对象成员n的值修改为60的语句应该是()classA{public:A(intx){n=x;}voidSetNum(intn1){n=n1;}private:intn;}intf(){A*ptr=newA(6);} A. A(60) B. SetNum(60) C. ptr->SetNum(60) D. ptr->n=60
【单选题】对于下面定义的类A在函数f()中将对象成员n的值修改为60的语句应该是()classA{public:A(intx){n=x;}voidSetNum(intn1){n=n1;}private:intn;}intf(){A*ptr=newA(6);} A. A(60) B. SetNum(60) C. ptr->SetNum(60) D. ptr->n=60
1