Click here to Skip to main content
15,921,716 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Everyone,

Please let me know. What is the difference between including header files in below mentioned ways.

1. #include<header>

2. #include"header.h"

Thanks in advance.
Posted

 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 6-Jun-11 17:09pm    
Correct, my 5.
--SA
Basically the difference is in the preprocessor search path for the file. See What is the difference between #include <filename> and #include “filename”[^] at stack overflow.

Note that header and header.h are different files.
 
Share this answer
 
v3
Comments
Niklas L 6-Jun-11 15:22pm    
Someone ate your brackets!! :oops:
CPallini 6-Jun-11 16:05pm    
Fixed. Thank you.
Sergey Alexandrovich Kryukov 6-Jun-11 17:09pm    
Sure, a 5.
--SA
See here[^]
 
Share this answer
 
the question should be like that.

#include<header.h> - system defined
#include "header.h" - user defined

the difference between these two header lines is that the first header line ( #include<header.h> ) fines the specific file in the system include file and the second header line( #include "header.h" ) fines the specific file in the
current development folder.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900