Pass the value that you wish to enqueue as a parameter: void ready_queue::enqueue(int val)
A few other suggestions:
temp and temp2 should be local variables inside read_queue::enqueue(), not members of the ready_queue class. This is because they aren't needed outside enqueue().
Consider what happens if you put 100 items in the queue. You end up with 100 ready_queue instances, each with a start_ptr, current, nxt and name. In reality, you only need one start_ptr for the queue, and one current_ptr. But you still need a nxt ptr for each item on the queue. What to do?
The answer is to create two classes: ready_queue and ready_queue_item:
1 2 3 4 5 6 7 8 9 10 11 12 13
class ready_queue_item {
public:
ready_queue_item *nxt;
int name;
};
class ready_queue{
private:
ready_queue_item *start_ptr;
ready_queue_item *current;
public:
void enqueue(int val);
};
Define constructors for both of these, that way it's impossible to mess up and create them with garbage values.