4

Probably a dumb question, but I'm just curious. What do the variables *temp and *perm mean in this structure?

struct process {
 int id;
 char name;
} *temp, *perm;
asked Nov 30, 2016 at 19:06
2
  • 1
    syntax diagrams! It's variables of type of pointer to process object (struct), obviously Commented Nov 30, 2016 at 19:07
  • See cplusplus.com/doc/tutorial/structures Commented Nov 30, 2016 at 19:11

1 Answer 1

10

Short version of

struct process {
 int id;
 char name;
};
process *temp;
process *perm;

This declares a struct type named process and then declares two variables which are pointers to process structs.

answered Nov 30, 2016 at 19:10
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.