C ++ Specify headers containing directory in code

Is there a way to specify include directories in code, possibly with #pragma?

I have my project setup as the folders "src /" and "include /". I am trying to compile in Visual Studio 2010, but I do not want to configure it in the project settings.

Is there any other way to enable compilation instead of specifying include as

#include ../include/ss.h
+3
source share
2 answers

The correct (tm) way to specify search directories is with compiler flags. In Visual Studio, you do this by playing with the project settings or its command line option /I.

+5

Visual Studio , Options/File Locations. . (, ). , , / .

0

Source: https://habr.com/ru/post/1762097/


All Articles