0

Employee メンバーを含む Restaurant というクラスがあります。現在、Employee は Restaurant のフレンド クラスです。これをコンパイルしようとすると、Employee mCurrentEmployee でエラーが発生し、型指定子が欠落している - int が想定されているというエラーが表示されます。なぜコンパイラはこれに腹を立てるのですか? どうすれば修正できるかについてのアイデアはありますか?ありがとう。

#pragma once
#include "employee.h"
class Restaurant{
    friend class Employee;

private:
    Employee mCurrentEmployee;

};

-

#pragma once
#include "restaurant.h"
class Employee {

}
4

1 に答える 1