What happens if there is a comment in header file name?
Parsing of `#include’ is slightly special because comments are not recognized within the ”. Thus, in `#include ‘ the `/*’ does not start a comment and the directive specifies inclusion of a system header file named `x/*y’. Of course, a header file with such a name is unlikely to exist on Unix, where shell wildcard features would make it hard to manipulate.
Below are some examples.
This will compile
Error: stdio.h/*comment*/: No such file or directory
Error: std/*comment*/io.h: No such file or directory
This article is contributed by Pankaj Boola. Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above
- How to write your own header file in C?
- Print "Hello World" in C/C++ without using any header file
- Difference between Header file and Library
- C program to copy contents of one file to another file
- numeric header in C++ STL | Set 1 (accumulate() and partial_sum())
- numeric header in C++ STL | Set 2 (adjacent_difference(), inner_product() and iota())
- What’s difference between header files "stdio.h" and "stdlib.h" ?
- Namespace in C++ | Set 3 (Accessing, creating header, nesting and aliasing)
- What is data type of FILE in C ?
- fsetpos() (Set File Position) in C
- C | File Handling | Question 5
- Basics of File Handling in C
- C | File Handling | Question 1
- C | File Handling | Question 2
- C | File Handling | Question 4