+ 4
Why we use #include in c++ program ?
My Theory : #include is used to include header files to our program, right ?
9 odpowiedzi
+ 11
Common in built function like getch() clrscr() stored in <conio.h> header files. to use this function we are including <conio.h> header file and the getch() function is used to hold the output screen for a while in the sense till any key is pressed.
+ 13
What do we have here?
https://www.sololearn.com/learn/CPlusPlus/1603/
+ 5
thats the main reason, which you have pointed out
+ 4
Maybe the question has been asked before and you could search for it.
+ 3
This explains it in detail
http://www.cplusplus.com/forum/articles/10627/
+ 3
Yup, if you don't include the header file, you can't use the class which is defined in the header file.
+ 2
Correct. You're just adding the contents of another file into your current file.
+ 2
It is used to include header files of c,c++
+ 2
The include statement actually copies the contents of the header file into the CPP file where the include statement is, during compilation. This is one of the reasons it's bad to use things like 'using std' In them as that using statement gets propagated into any CPP files that include that header.