-
January 7th, 2008, 10:38 PM
#1
[RESOLVED] Including header files.
Say I have a header file named as "Complex.h"
On .cpp I want to include it. So I test it on following three ways.
- #include "Complex.h"
- #include ".\complex.h"
- #include "complex.h"
In all ways it works fine. So that means there is no any different between above three line?
When I use IDE to add classes to my applications, the header files are included as the second way.
-
January 7th, 2008, 11:01 PM
#2
Re: Including header files.
Hello,
First and third has no difference since file name and extensions has no case difference in DOS / Windows. Second indicates that the include directories are set properly in your project.
Regards,
Pravin.
-
January 7th, 2008, 11:04 PM
#3
Re: Including header files.
Originally Posted by Pravin Kumar
First and third has no difference since file name and extensions has no case difference in DOS / Windows.
That mean header file names are case insensitive.
Originally Posted by Pravin Kumar
Second indicates that the include directories are set properly in your project.
Means, first check the working folder and if it is not found search the include directory, is that right?
Last edited by eranga262154; January 7th, 2008 at 11:06 PM.
Reason: incorrect tags
-
January 8th, 2008, 12:37 AM
#4
Re: Including header files.
Originally Posted by eranga262154
That mean header file names are case insensitive.
On Windows yet, but Linux no, so to get into good habits, use the same case as the file itself.
-
January 8th, 2008, 12:41 AM
#5
Re: Including header files.
Originally Posted by STLDude
use the same case as the file itself.
Yes, I always do it pal.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|