ciao a tutti,
forse sto per chiedervi una cavolata, ma non riesco a capire il problema che mi pone il compilatore. il codice è questo:
ovviamente nel file cpp ho definito il costruttore.class ps_power_module
{
friend class sc_simcontext;
friend class ps_configure_module;
private:
string module_name;
public:
static ps_configure_module configure;
// The map where save a power properties of each module
static std::map<string, ps_power_module_struct> power_module_table;
// The object for read the configure file
//static ps_configure_module configure;
//static unsigned count;
// The public constructor of the class power_module
ps_power_module();
// The distructor of the class
~ps_power_module()
{
};
};
#endif // __PS_POWER_MODULE_H
ora per utilizzare un oggetto di questa classe, dichiaro un puntatore tra le variabili pubbliche di un'altra classe(dove utilizzo il mio oggetto)
e nel costruttore, contenuto nel cpp, di questa classe scrivo:public :
sc_in<float> Vdd; // SYSTEMC MODIFICATION
ps_power_module * ps_module; // SYSTEMC MODIFICATION
a me sembra andare tutto bene ma il compilatore(GCC) mi dice:ps_module = new ps_power_module(); //SYSTEMC MODIFICATION
../../../../src/sysc/kernel/sc_module.h:383: error: ISO C++ forbids declaration of ‘ps_power_module’ with no type
../../../../src/sysc/kernel/sc_module.h:383: error: expected ‘;’ before ‘*’ token
Perchè, perchè, perchè????????????????????????????????????
grazie a chi mi toglierà questo dubbio...
Marco