V
vl_
Hello,
I am trying to declare "containerr" class for the template, so that it
would contain explicit size for the templated object:
MyClass.hpp
#include <queue>
template <typename T>
// Container class
class Element
{
public:
Element( T t, int size)
{
m_t = t;
m_size = size;
}
virtual ~Element() {};
T m_t;
int m_size;
} ;
// Queue wrapper
template <typename T>
class MyQueue
....
//STL queue declaration:
std::queue <Element> m_queue;
.....
I have the following error: "ISO C++ forbids declaration of `m_queue'
with no type,
expected a type, got `Element'"
Why doesn't compiler see declaration of type 'Element' ?
Thank you,
I am trying to declare "containerr" class for the template, so that it
would contain explicit size for the templated object:
MyClass.hpp
#include <queue>
template <typename T>
// Container class
class Element
{
public:
Element( T t, int size)
{
m_t = t;
m_size = size;
}
virtual ~Element() {};
T m_t;
int m_size;
} ;
// Queue wrapper
template <typename T>
class MyQueue
....
//STL queue declaration:
std::queue <Element> m_queue;
.....
I have the following error: "ISO C++ forbids declaration of `m_queue'
with no type,
expected a type, got `Element'"
Why doesn't compiler see declaration of type 'Element' ?
Thank you,