Home > Back-end >  C reconstruction function of an expression didn't understand
C reconstruction function of an expression didn't understand

Time:09-23

Refactoring functions of a c + + expression didn't understand

As shown in figure

The: id (n)
The id for the character variables

CodePudding user response:

The constructor initializes the list

CodePudding user response:

reference 1/f, cherish life away from the CPP response:
constructors to initialize a list

Id (n) what meaning be?????? (gather together ten words)

CodePudding user response:

refer to the second floor qq_36212394 response:
Quote: reference 1/f, cherish life away from the CPP response:
constructor initializes list

Id (n) what meaning be?????? (gather together ten words)


Equal to the difference between this & gt; Id=n;
The original poster with c + + textbook is this?

CodePudding user response:

Constructor, not reconstruction function,

CodePudding user response:

reference ooolinux reply: 3/f
Quote: refer to the second floor qq_36212394 response:

Quote: reference 1/f, cherish life away from the CPP response:
constructors to initialize a list

Id (n) what meaning be?????? (gather together ten words)


Equal to the difference between this & gt; Id=n;
The original poster with c + + textbook is this?

We haven't bought this c + + plus open

CodePudding user response:

Constructors to initialize a list
Stu (string & amp; N,... ) : id (n)

Equivalent to

Stu (string & amp; N,... )
{
Id=n;
}

Actually cannot say equivalent, can only say that the results the same

In the initialization list, use less,,, if not familiar with, honestly to initialize the member variables in the constructor body is much more secure,,,
  • Related