How to include a file from another folder?

后端 未结 3 911
南笙
南笙 2021-01-31 19:35

In my current project I have separated my class files and my header files. My project structure currently looks like this:

  • Project

    • Source
3条回答
  •  南方客
    南方客 (楼主)
    2021-01-31 20:06

    You need to indicate the include path to your compiler so that the compiler is able to find the included headers. Using gcc, you could use -I option, and using visual studio, you could use /I.

提交回复
热议问题