• Advertisement
Sign in to follow this  

Ugh...always stupid errors

This topic is 2455 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm sitting around doing project Euler problems, and I'm constructing a solution to one of the problems but I'm getting an error from this here (nowhere near finished yet):


#include <iostream>
#include <conio.h>
#include <queue>

template<class T>
class Queue : public queue<T>
{
public:
T dequeue()
{
T tmp = front(); //storing the current front of the queue for return
queue<T>::pop(); //now remove it
return tmp;
}

void enqueue(const T& element)
{
queue<T>::push(element); // add element to queue
}
};

template<class T>
class BTNode
{
private:
BTNode * left, *right;
T element;
public:
BTNode()
{
left = right = 0;
}

BTNode(T &el, BTNode * l, BTNode * r)
{
left = l;
right = r;
element = el;
}

~BTNode()
{
delete left;
delete right;
}

};

void main()
{
getch();
}


It says: error C2143: syntax error : missing ',' before '<' Line 6

Can someone point it out because I'm not seeing it...haha


-edit- OK apparently it was some kind of bug...I got it to work now.

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement