Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does a slash mean in an include statement?

Tags:

c++

c

There is a following statement in the file:

#include "ssutil/DataBuffer.h"

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

like image 299
Kumar Avatar asked Nov 18 '11 12:11

Kumar


2 Answers

That is a relative path and the preprocessor will look for the file in a directory called ssiutil. Precisely where that directory is depends on your compiler options. For example the MS compiler searches like this:

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

You may need to consult the documentation for your particular tools to learn how the search is done.

like image 60
David Heffernan Avatar answered Oct 31 '22 22:10

David Heffernan


It's a path component. ssiutil is a directory and DataBuffer.h is the actual header. The / is a path separation character used on Unix platforms like Mac OS X, Linux, the BSDs and others as well as Windows.

like image 35
jer Avatar answered Nov 01 '22 00:11

jer