Can we use two r more header files in program?and how do we know to use particular header file.. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Can we use two r more header files in program?and how do we know to use particular header file..

plz answer it..nd in the same manner..execute the prgm with different header files

27th Apr 2018, 1:16 PM
manasa yanaki
manasa yanaki - avatar
2 Answers
+ 2
You can use as many as you need. Include the headers for each function or class you use. The documentation on that class or function will tell you. std::string requires the string header. Finish your course, too. That'll help explain everything.
27th Apr 2018, 1:52 PM
non
+ 1
Yes. You can also make a file with .h extension and add the file like this- #include "quotation.h" (save the file where you saved the .c file/your program. You will know what header file to use according to the library functions you use in the program. Don't worry your code won't compile without header file. And you can look up its name.😂😂
27th Apr 2018, 2:18 PM
Akib
Akib - avatar