In some pieces of code I see something like this:
#include <SFML/Graphics.hpp>
#include <Qt/qwidget.h>
What is the difference with the “/” character compared to including a header like this:
#include <iostream>
I tried googling but I couldn’t find any good results.
Include directives are for including single header files. They essentially replace the directive by the file in question. A header file itself may be part of a library.
The piece before the
/is a directory where the header file is placed, relative to a directory in the include search path used for compilation. Say my compiler knows to search in/usr/include, and all myboostheaders are in/usr/include/boost. I can then include boost headers in my code using for example