Why am I getting errors: 'process' : 'struct' type redefinition 'node' : 'struct' type redefinition 'queue' : 'class' type redefinition
My first guess is you're using Visual C++ :) It compiles fine with g++, maybe try:
struct process
{
int pid; // process id
char* file_name; // file name of the process to be run
int cpu_time; // amount of time the process needs with the cpu
int request_priority; // priority from 1-5 (higher is better)
int pr; // adjusted priority rate
};
/************************************************** ********************/
/***** A NODE OF OUR BINARY TREE
/************************************************** ********************/
struct node
{
process key;
// pointers to child nodes
node *left;
node *right;
};
/************************************************** ********************/
/***** ADT PRIORITY QUEUE HEAP STRUCTURE (BINARY TREE)
/************************************************** ********************/
class queue
{
node* root;
void insert(<strong>struct process, struct node*</strong>); // helper function for public insert()
public:
queue(); // constructor function
void insert(<strong>struct process</strong>);
void traverse(<strong>struct node*</strong>);
bool isEmpty();
};