Jump to content
  • Advertisement
Sign in to follow this  
Amaz1ng

Ugh...always stupid errors

This topic is 2572 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
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!