-5
私は以下のように宣言されたクラスを持っています。私は他の同様の質問を見てきましたが、私の問題の解決策を見つけることができません。どんな助け?前もって感謝します! :)あなたは、円形のを避けることができ"タイプに名前はありません"エラーC++
#ifndef ENTRANCE_H
#define ENTRANCE_H
#include "Segment.h"
#include <vector>
#include "Diodio.h"
class Entrance
{
public:
Entrance();
~Entrance();
void operate();
protected:
Segment *givesEntryTo;
std::vector<Diodio> elBooths;
std::vector<Diodio> manBooths;
private:
};
#endif // ENTRANCE_H
ほとんどの場合、ヘッダー間に循環依存関係があります。 – molbdnilo
推測:Segment.hに直接または間接的にEntrance.hが含まれていますか? – aschepler
これはクラス**の定義**です。クラスの宣言は 'class Entrance;'となります。 – IInspectable