[CSI] Difference Between #include <filename> and #include "filename.hpp"

Mikhail Nesterenko mikhail at cs.kent.edu
Thu Jun 30 11:51:03 EDT 2022


> Hello Professor Nesterenko, today class we went over
> #include <filename> - file is found in standard system-dependent location
> #include ???filename.hpp??? - file is found in the same directory as the rest
> of the code
> 
> I answered that "filename.hpp" is made by the programmer while <filename>
> comes from the repository but you said that was wrong and to email you to
> get a full explanation on where it comes from. Thank you for your time.

I do not remember what we said exactly. Both standard include files as
well as programmer-written include (header) files are source code to
be inserted by the compiler into the source files as it compiles them.

Here is an example of iostream that is included by

     #include <iostream>

https://code.woboq.org/gcc/libstdc++-v3/include/std/iostream.html

Thanks,
--
Mikhail


More information about the cs13001 mailing list