L
Lucas Kanebley Tavares
Ok, I found a lot of similar errors to this on the net (and here), but
none just like it.
What I have is a bunch of classes that define a few members, for
isntance:
class ds_node {
____public:
________typedef typename std::map<ds_node, bool> old_nodes;
________static ds_node *first(fsm_core &m);
________static ds_node *next(fsm_core &m, ds_node &node, int input);
..... (a bunch of stuff goes here) ...
};
and another templated class which is suppose to use those previously
defined classes.
template <class T>
class suc_tree {
____public:
____void run(fsm_core &m);
....
};
template <class T>
void suc_tree<T>::run(fsm_core &m) {
____T:ld_nodes old_node;
____T *cur = T::first(m);
.....
}
and I was wondering if this is doable without using inheritance and/or
what would be the suggested methods to go about doing this. The error
I'm getting is:
suctree.hpp|47|error: expected `;' before "old_node" (line 47 =
old_node declaration).
suctree.hpp|64|error: `old_node' was not declared in this scope (line
64 = old_node first use)
After that I get a LOT of STL related errors, but I suppose that once
these are fixed they'll go away. And as I get no errors from calling
first or next, I suppose that I shouldn't get any while declaring
old_node.
Thanks in advance.
Lucas
none just like it.
What I have is a bunch of classes that define a few members, for
isntance:
class ds_node {
____public:
________typedef typename std::map<ds_node, bool> old_nodes;
________static ds_node *first(fsm_core &m);
________static ds_node *next(fsm_core &m, ds_node &node, int input);
..... (a bunch of stuff goes here) ...
};
and another templated class which is suppose to use those previously
defined classes.
template <class T>
class suc_tree {
____public:
____void run(fsm_core &m);
....
};
template <class T>
void suc_tree<T>::run(fsm_core &m) {
____T:ld_nodes old_node;
____T *cur = T::first(m);
.....
}
and I was wondering if this is doable without using inheritance and/or
what would be the suggested methods to go about doing this. The error
I'm getting is:
suctree.hpp|47|error: expected `;' before "old_node" (line 47 =
old_node declaration).
suctree.hpp|64|error: `old_node' was not declared in this scope (line
64 = old_node first use)
After that I get a LOT of STL related errors, but I suppose that once
these are fixed they'll go away. And as I get no errors from calling
first or next, I suppose that I shouldn't get any while declaring
old_node.
Thanks in advance.
Lucas