Codice: Seleziona tutto
In file included from impl.cpp:4:0:
header.h:12:9: error: ‘Utente’ does not name a type
Utente *u;
^
header.h:13:9: error: ‘Gruppo’ does not name a type
Gruppo *g;
^
In file included from main.cpp:4:0:
header.h:12:9: error: ‘Utente’ does not name a type
Utente *u;
^
header.h:13:9: error: ‘Gruppo’ does not name a type
Gruppo *g;
^
header.h
Codice: Seleziona tutto
class Rete{
public:
Rete();
virtual ~Rete();
void insGruppo();
void insUtente();
void UtoG();
void stampa();
private:
Utente *u;
Gruppo *g;
};
class Utente: public Rete{
public:
Utente();
~Utente();
protected:
std::string codice, nome, cognome, eMail;
};
class Gruppo: public Rete{
public:
Gruppo();
~Gruppo();
protected:
std::string data, nomeGruppo;
Utente *ug;
};
Codice: Seleziona tutto
#ifndef F
#define F
#include <iostream>
#include "header.h"
#endif // F
Rete::Rete(){
};
Rete::~Rete(){
};
Gruppo::Gruppo(){
ug=new Utente[100];
};
Gruppo::~Gruppo(){
delete ug;
};
Utente::Utente(){
};
Utente::~Utente(){
};
Codice: Seleziona tutto
#ifndef F
#define F
#include <iostream>
#include "header.h"
#endif // F
int main(){
}
Non capisco come risolvere, è che quei due puntatori mi servono per implementare quest'algoritmo.