+ 3

Why we are using # in header files....in c and c++?

20th Aug 2018, 3:05 PM
Monica Raghu
Monica Raghu - avatar
10 odpowiedzi
+ 5
#include is directive that calls the preprocessor to include header file with Your code. & header files contain the declaration of predefined FUNCTION.
21st Aug 2018, 4:13 AM
Mohd Abdul Sameer
Mohd Abdul Sameer - avatar
+ 3
Hi Monica Raghu , once you build code, there are few steps which takes place before you get .exe or .DLL file from your code... first step is preprocessing... this step is responsible for expansion of code from different units... there are different preprocessor directives for example, include, ifndef etc.. to let compiler know that statement is nothing but usage of preprocessor directives, it should be started with #... it's how c++ notation is.. so, #include on header file is to indicate that preprocessor has to include code of that header file...
20th Aug 2018, 3:21 PM
Ketan Lalcheta
Ketan Lalcheta - avatar
+ 2
it's used for including
20th Aug 2018, 3:18 PM
Abdulaziz Shamma
Abdulaziz Shamma - avatar
+ 2
for using predefined function you have to include the file in which its declaration is present.. for including file we use # and the file name you can also include de your file
21st Aug 2018, 9:41 AM
Aarav Raj
Aarav Raj - avatar
+ 1
tq sir Ketan Lalcheta 😊
20th Aug 2018, 3:25 PM
Monica Raghu
Monica Raghu - avatar
+ 1
happy to help
20th Aug 2018, 3:26 PM
Ketan Lalcheta
Ketan Lalcheta - avatar
+ 1
🙄
21st Aug 2018, 12:46 AM
Jahnavi.B
Jahnavi.B - avatar
0
😜😝
21st Aug 2018, 12:47 AM
Monica Raghu
Monica Raghu - avatar
0
because the all pre defined function are inside in this header file for perform a particluar task
22nd Aug 2018, 7:31 AM
Yash Soni
Yash Soni - avatar
0
# represents start, hence.
22nd Aug 2018, 8:29 AM
Varun Vrd
Varun Vrd - avatar