Home > Back-end >  Turn to for help! Bosses!
Turn to for help! Bosses!

Time:10-02

In the yellow marked part, since the c2 and this pointer can replace each other, so why not can be directly written return c2?? (thank you!

CodePudding user response:

How do you know this point to c2???????

CodePudding user response:

You try, but I assure you that you compile

CodePudding user response:

refer to the second floor ggglivw response:
you try, but I assure you that you compile
hey hey, this is the teacher speak in class to knock the code, make up not to come out, more disorderly at the time, has been to the end of the assignment of c2=c1, the next to speak simply to c3=c2=c1 this step, which must return but I don't understand why can't direct return c2 but to use this pointer instead of can?  , thank you bosses reply

CodePudding user response:

First of all, you that c2 is not within the class members, but in the main function defined within an object, of course can't return it directly, because it isn't in the class, and the meaning of this pointer is pointing to invoke its object, and the assignment operator is to return calls its object

CodePudding user response:

Give some useful points ~ ~ ~

CodePudding user response:

reference 5 floor abcd7038 reply:
give some useful points ~ ~ ~
wow! Is very useful, thank you for your luo

CodePudding user response:

The
reference 5 floor abcd7038 response:
give some useful points ~ ~ ~
ok

CodePudding user response:

Why not give points???
  • Related