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
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.
- Print "Hello World" in C/C++ without using any header file
- How to write your own header file in C?
- Difference between Header file and Library
- time.h header file in C with Examples
- <complex.h> header file in C with Examples
- accumulate() and partial_sum() in C++ STL : numeric header
- numeric header in C++ STL | Set 2 (adjacent_difference(), inner_product() and iota())
- Namespace in C++ | Set 3 (Accessing, creating header, nesting and aliasing)
- What’s difference between header files "stdio.h" and "stdlib.h" ?
- dos.h header in C with examples
- Header files in C/C++ with Examples
- C program to copy contents of one file to another file
- Can we access global variable if there is a local variable with same name?
- Name Mangling and extern "C" in C++
- How to print a variable name in C?
- Why variable name does not start with numbers in C ?
- C program to store Student records as Structures and Sort them by Name
- Hiding of all overloaded methods with same name in base class
- fopen() for an existing file in write mode
- Implement your own tail (Read last n lines of a huge file)