Home > Back-end >  Queue table data structure
Queue table data structure

Time:09-30

The first words what mean LinkQueue & amp; Q this sentence thanks just learning data structure with difficulty

CodePudding user response:

This can be as simple as passing a LinkQueue variables of type the address

CodePudding user response:

reference 1st floor magicdoubi response:
this can be as simple as passing a LinkQueue type variable address

What is the difference between this and LinkQueue * Q again

CodePudding user response:

LinkQueue & amp; Q
You changed the Q value in the function, function return after the end of the argument Q was altered
LinkQueue * Q
If you change in the function pointer Q point, it's just change the parameter, function return after the end of the argument a pointer Q points to no change, no change in the function pointer Q point, just for example)

Outside the Q, is your incoming variable
I don't know so I can understand, you can have a look at the c language reference, the arguments parameter

I felt that for this function, as if to add & amp; Use
If it is Q=malloc (), when the incoming will have to add & amp;
Because this must change the Q value

CodePudding user response:

reference magicdoubi reply: 3/f
LinkQueue & amp; Q
You changed the Q value in the function, function return after the end of the argument Q was altered
LinkQueue * Q
If you change in the function pointer Q point, it's just change the parameter, function return after the end of the argument a pointer Q points to no change, no change in the function pointer Q point, just for example)

Outside the Q, is your incoming variable
I don't know so I can understand, you can have a look at the c language reference, the arguments parameter

I felt that for this function, as if to add & amp; Use
If it is Q=malloc (), when the incoming will have to add & amp;
Because it want to change the value of Q

Thank you thank you thank you
  • Related