title: error C2679: binary '<<' : no operator found which takes a right-hand operand of type 'Car' (or there is no acceptable conversion)
body: <p>Queue class</p>
  
  <pre><code>   #ifndef Queue_H
      #define Queue_H
  
      #include "Car.h"
      #include &lt;iostream&gt;
      #include &lt;string&gt;
  
      using namespace std;
  
      const int Q_MAX_SIZE = 20;
  
      class Queue {
      private:
  
          int size; // size of the queue
          Car carQueue[Q_MAX_SIZE];
          int front, rear;
      public:
          Queue();
          ~Queue();
          bool isEmpty();
          bool isFull();
          void enqueue(Car c);
          void dequeue(); // just dequeue the last car in the queue
          void dequeue(Car c); // if a certain car wants to go out of the queue midway. 
                               // Condition: Car is not in washing. Meaning is not the 1st item in the queue
          void dequeue(int index); // same as the previous comment
          Car getFront();
          void getCarQueue(Queue);
          int length();
          Car get(int);
      };
  
      Queue::Queue() {
          size = 0;
          front = 0;
          rear = Q_MAX_SIZE -1;
      }
  
      Queue::~Queue() { 
          while(!isEmpty()) {
              dequeue();
          }
      }
  
      void Queue::enqueue(Car c) {
          if (!isFull()) {
              rear = (rear + 1) % Q_MAX_SIZE; // circular array
              carQueue[rear] = c;
              size++;
          } else {
              cout &lt;&lt; "Queue is currently full.\n";
          }
      }
  
      void Queue::dequeue() { 
  
      }
  
      void Queue::dequeue(int index) {
          if(!isEmpty()) {
              front = (front + 1) % Q_MAX_SIZE;
              if(front != index) {
                  carQueue[index-1] = carQueue[index];
                  rear--;
                  size--;
              } else {
                  cout &lt;&lt; "Not allowed to dequeue the first car in the queue.\n";
              }
          } else {
              cout &lt;&lt; "There are no cars to dequeue.\n";
          }
      }
  
      bool Queue::isEmpty() {
          return size == 0;   
      }
  
      bool Queue::isFull() {
          return (size == Q_MAX_SIZE);
      }
  
      Car Queue::getFront() {
          return carQueue[front];
      }
  
      int Queue::length() {
          return size;
      }
  
      Car Queue::get(int index) {
          return carQueue[index-1];
      }
  
      void Queue::getCarQueue(Queue q) {
          for(int i = 0; i&lt; q.length(); i++) 
              cout &lt;&lt; q.get(i) &lt;&lt; endl;  // Error here
      }
  
      #endif
  </code></pre>
  
  <p>error C2679: binary '&lt;&lt;' : no operator found which takes a right-hand operand of type 'Car' (or there is no acceptable conversion) 
  I get this error which is kind of odd. so is there anything wrong? Thanks!</p>