Home > Back-end >  The small white list
The small white list

Time:09-30

O analyze the two writing questions

CodePudding user response:

Very problematic,
1. In C + + mix all kinds of typical C style
Typedef struct student {
.
} student, * the head;
Really, that I also read a textbook, infinite traps, destroyed a tireless, really
A simple thing, also gave him the two other alias, now you got 3 things, your code is behind the chaos was
Here is a student, there came to a head, good hard to understand, and the head also is not a good name,,,
Directly with the student *, student * *; More intuitive, isn't it?

In C language, typedef struct student student.
Just for the sake of in the subsequent code, each province to write a struct
In c + + basic no typedef, you can directly use the student

2. The function to break up, don't put all the things written into a function in the

3. I want to say some business logic words
First - & gt; Next=node;
Node - & gt; The front=first;
Node - & gt; Next=NULL
The first=node;//here you replace the first with the node, to form the loop, and the node to find the next time, returned to the node, and then back again next node
Dead cycle

Finally,, don't map, don't map, your post code, others can download the code directly, without extra trouble might stick to good code, we are back to you only for a moment kungfu
Lift a finger, you map, others were too lazy to reason you

CodePudding user response:

reference 1st floor yukint response:
is very problematic,
1. In C + + mix all kinds of typical C style
Typedef struct student {
.
} student, * the head;
Really, that I also read a textbook, infinite traps, destroyed a tireless, really
A simple thing, also gave him the two other alias, now you got 3 things, your code is behind the chaos was
Here is a student, there came to a head, good hard to understand, and the head also is not a good name,,,
Directly with the student *, student * *; More intuitive, isn't it?

In C language, typedef struct student student.
Just for the sake of in the subsequent code, each province to write a struct
In c + + basic no typedef, you can directly use the student

2. The function to break up, don't put all the things written into a function in the

3. I want to say some business logic words
First - & gt; Next=node;
Node - & gt; The front=first;
Node - & gt; Next=NULL
The first=node;//here you replace the first with the node, to form the loop, and the node to find the next time, returned to the node, and then back again next node
Dead cycle

Finally,, don't map, don't map, your post code, others can download the code directly, without extra trouble might stick to good code, we are back to you only for a moment kungfu
Lift a finger, you map, others were too lazy to reason you

I'm sorry, just see the reply, I was rewritten, resolved the

CodePudding user response:

reference 1st floor yukint response:
is very problematic,
1. In C + + mix all kinds of typical C style
Typedef struct student {
.
} student, * the head;
Really, that I also read a textbook, infinite traps, destroyed a tireless, really
A simple thing, also gave him the two other alias, now you got 3 things, your code is behind the chaos was
Here is a student, there came to a head, good hard to understand, and the head also is not a good name,,,
Directly with the student *, student * *; More intuitive, isn't it?

In C language, typedef struct student student.
Just for the sake of in the subsequent code, each province to write a struct
In c + + basic no typedef, you can directly use the student

2. The function to break up, don't put all the things written into a function in the

3. I want to say some business logic words
First - & gt; Next=node;
Node - & gt; The front=first;
Node - & gt; Next=NULL
The first=node;//here you replace the first with the node, to form the loop, and the node to find the next time, returned to the node, and then back again next node
Dead cycle

Finally,, don't map, don't map, your post code, others can download the code directly, without extra trouble might stick to good code, we are back to you only for a moment kungfu
Lift a finger, you map, others were too lazy to reason you

I'm sorry, just see the reply, I was rewritten, resolved the

CodePudding user response:

reference 1st floor yukint response:
is very problematic,
1. In C + + mix all kinds of typical C style
Typedef struct student {
.
} student, * the head;
Really, that I also read a textbook, infinite traps, destroyed a tireless, really
A simple thing, also gave him the two other alias, now you got 3 things, your code is behind the chaos was
Here is a student, there came to a head, good hard to understand, and the head also is not a good name,,,
Directly with the student *, student * *; More intuitive, isn't it?

In C language, typedef struct student student.
Just for the sake of in the subsequent code, each province to write a struct
In c + + basic no typedef, you can directly use the student

2. The function to break up, don't put all the things written into a function in the

3. I want to say some business logic words
First - & gt; Next=node;
Node - & gt; The front=first;
Node - & gt; Next=NULL
The first=node;//here you replace the first with the node, to form the loop, and the node to find the next time, returned to the node, and then back again next node
Dead cycle

Finally,, don't map, don't map, your post code, others can download the code directly, without extra trouble might stick to good code, we are back to you only for a moment kungfu
Lift a finger, you map, others were too lazy to reason you

I'm sorry, just see the reply, I was rewritten, resolved the
  • Related