简体   繁体   English

缺少Visual Studio 2012;

[英]Visual Studio 2012 missing ;

#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? 可能会有些愚蠢,但是你们能指出我正确的方向吗?

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 一个不错的主意是为每个.h创建一个.cpp,除了包含标头之外,它还为空。

Sala.h.cpp : Sala.h.cpp

#include "Sala.h"

EdicaoDisciplina.h.cpp : EdicaoDisciplina.h.cpp

#include "EdicaoDisciplina.h"

Semana.h : Semana.h

#include "Semana.h"

Aluno.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 然后检查在编译它们时是否有任何.h.cpp产生了更有用的错误

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM