I am working on my final project for this class and I can't figure out this compile error.
The code:
The Error:
queue is a class that was made and works separate, and Customer is a class that we made and works separately. A is an array of Customer instances. I am trying to make a queue of all customers that are going to enter the sweepstakes.
The complete code can be found here.
Thanks in advance
The code:
Code:
queue<Customer> sweepstakes[750];
for(int i = 0; i < 1000; i++) {
if(A[i].getEntersSweepstakes())
sweepstakes.enqueue(A[i]); //error here
}
The Error:
c:\documents and settings\my documents\cecs 302\finalproject\usecustomer.cpp(34) : error C2228: left of '.enqueue' must have class/struct/union
queue is a class that was made and works separate, and Customer is a class that we made and works separately. A is an array of Customer instances. I am trying to make a queue of all customers that are going to enter the sweepstakes.
The complete code can be found here.
Thanks in advance