Including header files using "" vs <>

来源:互联网 发布:java magnet2torrent 编辑:程序博客网 时间:2024/05/19 22:50
when using #include to include header files,
  • If using <header.h>, the compiler will search the header file in the system header folder.
  • If using "header.h", the compiler will search the header file in the current folder first; if not found, it will search the header file in the system header folder.
  • In A.cpp, if using #include <A.h>,the following error message will show “fatal error C1083: Cannot open include file: 'A.h': No such file or directory”。using #include "A.h" can resolve this issue.
  • In a word,<> can be replaced with "", but "" can not be replaced with <>.

原创粉丝点击