Domanda

#pragma once

#include <string>
#include <list>
#include "Sala.h"
#include "EdicaoDisciplina.h"
#include "Semana.h"
#include "Aluno.h"
using namespace std;

class ActividadeLectiva{

private:
    EdicaoDisciplina disciplina;
    Semana semana;
    list <Sala> salas;
    int hora;
    string tipo;
    string descricao;
    list <Aluno> alunos;

public:
    ActividadeLectiva();
    ActividadeLectiva(EdicaoDisciplina disc, Semana semana, list <Sala> salas, int hora, string tipo, string descricao, list<Aluno> alunos);
    ActividadeLectiva(const ActividadeLectiva &e);
    ~ActividadeLectiva();

    EdicaoDisciplina getDisciplina() const;
    Semana getSemana() const;
    list <Sala> getSalas() const;
    int getHora() const;
    string getTipo() const;
    string getDescricao() const;
    list <Aluno> getAlunos() const;

    void setDisciplina(const EdicaoDisciplina &e);
    void setSemana(const Semana &s);
    void setSalas(list <Sala> salas);
    void setHora(int hora);
    void setTipo(string tipo);
    void setDescricao(string descricao);
    void setAlunos(list <Aluno> alunos);
};

It keeps giving me tons of error of missing ';' before the identifiers but I swear to god I can't figure where the problem is. Iam kind of tired but still I don't see any error. It will probably be something dumb but could you guys point me out to the right direction?

È stato utile?

Soluzione

The problem can be in one of these include files:

#include "Sala.h"
#include "EdicaoDisciplina.h"
#include "Semana.h"
#include "Aluno.h"

It is a good idea to create a .cpp for each .h that is empty asside from including the header so

Sala.h.cpp:

#include "Sala.h"

EdicaoDisciplina.h.cpp:

#include "EdicaoDisciplina.h"

Semana.h:

#include "Semana.h"

Aluno.h:

#include "Aluno.h"

and so on, repeating this for all include files in those include files, etc..

and then check to see if any of the .h.cpp produce a more useful error when you compile them

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top