By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,853 Members | 2,144 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,853 IT Pros & Developers. It's quick & easy.

Does #include "..." mean it's a user defined header file?

P: n/a
I am a novice programmer. I got half implemented C++ coding from customer site. I need to proceed implementing that coding.
At that code, there is #include "logger.h"
header file.
My question is that "logger.h" is system defined header file? I mean ""logger.h" is supported by library such as <windows.h> or <iostream.h>?"
Or the developer must write "logger.h" by themselves?
According to my idea, " " means user defined header file. Am I right?
Thanks in advanced.
Nov 2 '10 #1
Share this Question
Share on Google+
4 Replies


Meetee
Expert Mod 100+
P: 931
Check this and this
Nov 2 '10 #2

100+
P: 687
I mean "logger.h" is supported by library such as <windows.h> or <iostream.h>?"

iostream and windows.h are not libraries, they are header files. logger.h is not a part of standard C++ library. It's either part of a project itself or some third-party components. Comment it and see what is missing.
Nov 2 '10 #3

Banfa
Expert Mod 5K+
P: 8,916
#include "..." as opposed to #include <...> does not mean user defined.

It tells the compiler to check the directory of the current file for the included file first before checking for files in the standard include path.

On the other hand using <> tells the compiler to ignore the directory of the current file and just check in the standard include path.

It is normal (but not required) to use "" for headers that are part of the program source and <> for headers that are part of the system.
Nov 2 '10 #4

Expert 100+
P: 2,398
I don't think the C Standard requires a compiler to treat the two forms of #include differently; so you can't count on it to mean anything.
Nov 4 '10 #5

Post your reply

Sign in to post your reply or Sign up for a free account.