[Lemon-user] ISO C++ forbids declaration of «FilterEdge» with no type

Cherif Mouaouia Bouzid cherifmouaouia.bouzid at gmail.com
Thu Feb 17 10:21:07 CET 2011


Hello everybody

I'm trying to write a clustering program. The clustering algorithm I'm
working on is based on graph concepts. Let's say we have two classes :
- Clustering
- SuperiorThresholdGraph
The first one is a representation of the clustering instance and the second
one is used for computing stuffs.
When compiling the project, I get the following error :
.../SuperiorThresholdGraph.h|10|erreur: ISO C++ forbids declaration of
«FilterEdge» with no type|
.../SuperiorThresholdGraph.h|10|erreur: expected «;» before «<» token|
.../SuperiorThresholdGraph.cpp||In constructor
«SuperiorThresholdGraph::SuperiorThresholdGraph(lemon::ListGraph&,
double)»:|
.../SuperiorThresholdGraph.cpp|3|erreur: class «SuperiorThresholdGraph» does
not have any field named «m_gsupsd»|
||=== Build finished: 3 errors, 0 warnings ===|

Here are the headers files:

This is a what i think relevant in Clustering.h :

#ifndef CLUSTERING_H
#define CLUSTERING_H

#include "lemon/list_graph.h"
#include "lemon/lgf_reader.h"
#include "lemon/adaptors.h"
#include "lemon/connectivity.h"
#include "lemon/time_measure.h"
#include <math.h>

using namespace lemon;
using namespace std;

class Clustering
{

    protected:
        //Members
        ListGraph &m_g; //Complete graph which should contains informations
about the clustering instance
        string m_name; //Instance name
        ListGraph::NodeMap<string> m_label;  //A map of string on the nodes
of m_g to describe their label
        ListGraph::EdgeMap<double> m_dist;   //A map of double on the edges
of m_g to describe the distances between nodes
        set<double> m_D;
        ...
    public:
        friend class SuperiorThresholdGraph; // The SuperiorThresholdGraph
methods can access freely the members of Clustering objects
        //Public methods
        Clustering(ListGraph &g, string name); //Constructor
        ...
    };

#endif // CLUSTERING_H

This is SuperiorThresholdGraph.h :

#ifndef SUPERIORTHRESHOLDGRAPH_H
#define SUPERIORTHRESHOLDGRAPH_H

#include "Clustering.h"

class SuperiorThresholdGraph
{
    protected:
    ListGraph::EdgeMap<bool> m_filter;
    FilterEdge<ListGraph> m_gsupsd; // <--- THE ERROR IS HERE :
    double m_threshold;
    public:
        SuperiorThresholdGraph(ListGraph &g, const double threshold);
};

#endif // SUPERIORTHRESHOLDGRAPH_H

And this is SuperiorThresholdGraph.cpp :

#include "include/SuperiorThresholdGraph.h"

SuperiorThresholdGraph::SuperiorThresholdGraph(ListGraph &g, const double
threshold) : m_filter(g), m_gsupsd(g,m_filter), m_threshold(threshold)
{
    //ctor
}

Could you please show me a way to fix that ?

Thanks

Cherif, Algeria
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lemon.cs.elte.hu/pipermail/lemon-user/attachments/20110217/aa8d0e72/attachment.html>


More information about the Lemon-user mailing list