Aha,
I've just fired up one of my linux boxes, I've created a project in codeblocks using your files. I've made my suggested changes and and tried compiling... And there are still compiler errors.
The problem seems to be regarding the base class members (from ArrayQueue.h) in the Deque class. For some reason g++ doesn't seem to recognise the protected members from ArrayQueue.h like front, back, count, items etc.
I'm not sure if there's a compiler switch to enable the compiler to recognise these correctly, but I've found that if you reference the base-class members using the 'this' pointer in Deque.h, then the compiler errors disappear.
Here's a snippet from Deque.h to show you what I mean:
template <class T>
bool Deque<T>::dequeueBack(T &itemRef){
if (this->isEmpty()){//cannot dequeue
//cout<<"Empty dequeueBack in Dequeue\n";
return false;
}
else{//procede dequeuing
itemRef= this->items[this->back];
if (this->back==0)
this->back = MaxQueue-1;
else
this->back--;
}
this->count--;
return true;
}
Anyways, the program now compiles without errors or warnings on windows and *nix. A .zip is attached with my changes applied.
In order to ensure that my changes haven't introduced any bugs to your code (apologies if any have crept in there!); you might want to ensure that the program still works in the way you originally intended it to.
Cheers for now,
Jas.
[EDIT]
p.s. I'm fairly new to *nix programming myself...Up until recently I've only ever developed on Windows (so yes, I'm a bit wintarded!). The little *nix programming I have done so far has been for my own amusement.
Anyways, out of curiosity I've done a bit of digging on other forums on this matter and it seems that on *nix, the 'this->' syntax is the norm when attempting to access base class members in derived types.
As far as I understand it, when 'this' is used; if the G++ compiler cannot find a class member/variable in the local scope it will also look for it in any base classes.
I'm not sure if 'this' is needed to access the base class members of all derived types or whether it is only templates that require it.