c++ how to include (circular dependency)?

后端 未结 2 1265
悲&欢浪女
悲&欢浪女 2021-01-15 04:07

I have Environment.h file:

#include 
#include \"interfaces.h\"

#ifndef ENVIRONMENT_H
#define ENVIRONMENT_H

class Environment {};
#endif
<         


        
2条回答
  •  没有蜡笔的小新
    2021-01-15 05:00

    It looks like you misspelled the class name a few times (Environtment,Envrirontment). Could that be the origin of your issue?

    Otherwise I typically use the Forwarded Declaration

提交回复
热议问题