What does a slash mean in an include statement?

The file has the following statement:

#include "ssutil/DataBuffer.h" 

Please let me know where to look for this header file and how to interpret ssutil/ ?

+4
source share
2 answers

This is a component of the path. ssiutil is the directory, and DataBuffer.h is the actual header. / is a path separation character used on Unix platforms such as Mac OS X, Linux, BSD and others, as well as Windows.

+2
source

This is a relative path, and the preprocessor will look for a file in a directory called ssiutil . Exactly where this directory depends on your compiler options. For example, the MS compiler searches as follows:

This form tells the preprocessor to look for include files in the same directory of the file that contains the #include statement, and then in directories of any files that include (#include) this file. The preprocessor then searches the path specified by the / I compiler option, and then the paths specified by the INCLUDE environment variable.

You may need to review the documentation for your specific tools to find out how the search is performed.

+2
source

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


All Articles