i am getting the following error in my code. I am trying to convert a queue class to a template. the compiler doesn't like my operator overloading. I get the following error:

queue.h(20) : error C2679: binary '<<' : no operator defined which
takes a right-hand operand of type 'class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >' (or there is no acceptable conversion)

queue.h(16) : while compiling class-template member function
'class ostream &__cdecl Queue<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >:perator <<(class ostream &,class Queue<class std::basic_string<char,struct std::char_traits<char>,
class std::allocator<char> > >)'
Error executing cl.exe.

main.obj - 1 error(s), 1 warning(s)


here's my code:

//main.cpp

#include "queue.h"

#include <string>
using std::string;

int main() {
Queue <int> q;
q.enqueue(123);
q.enqueue(42);
cout << q;
q.dequeue();
cout << q;

Queue <string> s;
s.enqueue("student1");
s.enqueue("student2");
cout << s;
s.dequeue();
cout << s;
return 0;

}
--------------------------------
//queue.h

#ifndef _QUEUE_H
#define _QUEUE_H

#include <iostream.h>
using std::cout;
using std::endl;

template <class T>
class Queue {

friend ostream& operator<<(ostream& out, class <T> q) {
out << "Front" << endl;
for (int i = q.myFront; i != q.myNextFreePosition; q.incr(i)) {
out << q.myData[i] <<"," ;
}
out << "END" << endl;
return out;
}

public:
T dequeue() {
T retval = myData [myFront];
return retval;
} //removes element from front

void enqueue(T item){
myData[myNextFreePosition] = item;
incr (myNextFreePosition);
} // adds element to back

bool empty() {
return (myNextFreePosition == myFront);
}

T front (){
return myData[myFront];
} //returns element from front

Queue(){
myNextFreePosition = 0;
myFront = 0;
} //constructor

private:
void incr (int &pos) {
pos = (pos + 1) % 1300;
}//increment index of array

T myData[1300]; // array of data
int myNextFreePosition; // next free position
int myFront; //front of queue
};
#endif


my program does not like the <string> class in main.cpp. if i replace <string> with <char*> the program works. however my lab assignment is to use <string>. Any ideas on why i am getting this error. been looking at this program too long now to see what's wrong. sure it's obvious to everyone but me. thanks.