Burnie Burnie - 6 days ago 5
C++ Question

Structures in C++ *

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;

Answer

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.