2009-10-17 8 views
0

Je reçois l'erreur ci-dessous lors de la compilation de mon fichier.Constructeur attendu, destructeur ou conversion de type avant le jeton '::'

//Error 
PluginDiskstats.cpp:107: error: expected constructor, destructor, or type conversion before '::' token 
scons: *** [PluginDiskstats.o] Error 1 



// destructor 
~PluginDiskstats::PluginDiskstats() // line 107 
{ 
    if (stream != NULL) { 
     fclose(stream); 
     stream = NULL; 
    } 
    hash_destroy(&DISKSTATS); 
} 



// header file 

#ifndef __PLUGIN_DISKSTATS_H__ 
#define __PLUGIN_DISKSTATS_H__ 

#include <QObject> 
#include "Hash.h" 

class PluginDiskstats : public QObject { 
    Q_OBJECT 
    HASH DISKSTATS; 
    FILE *stream; 
    int ParseDiskstats(); 

    public: 
    PluginDiskstats(); 
    ~PluginDiskstats(); 

    public slots: 
    double Diskstats(QString arg1, QString arg2, double arg3); 
}; 

#endif 

Répondre

6

Modifier la ligne 107 à:

PluginDiskstats::~PluginDiskstats() 
+0

/Man facepalm ne peut pas croire que je ne l'ai pas vu cela. Merci. – Scott

Questions connexes