{"id":443,"date":"2023-02-12T02:16:00","date_gmt":"2023-02-12T02:16:00","guid":{"rendered":"https:\/\/aipsacademy.com\/blogs\/?p=443"},"modified":"2023-02-12T02:16:01","modified_gmt":"2023-02-12T02:16:01","slug":"how-to-create-own-header-file-in-c-with-example","status":"publish","type":"post","link":"https:\/\/aipsacademy.com\/blogs\/2023\/02\/12\/how-to-create-own-header-file-in-c-with-example\/","title":{"rendered":"How to create own Header File in C++ with example"},"content":{"rendered":"\n<p><strong>In this topic we are going to learn How to create own&nbsp;<\/strong><a href=\"https:\/\/www.learncpp.com\/cpp-tutorial\/header-files\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>header file<\/strong><\/a><strong>&nbsp;in c++ in very easy steps.<\/strong><\/p>\n\n\n\n<p><strong>As we know that Header file is a file that contains the definition of&nbsp;<\/strong><a href=\"https:\/\/www.nipsacademy.com\/blogs\/functions-in-c-language\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>functions or methods<\/strong><\/a><strong>.<\/strong><\/p>\n\n\n\n<p><strong><em>It has extension .h by default.<\/em><\/strong><strong><\/strong><\/p>\n\n\n\n<p><strong>If we write header files in a program then their respective&nbsp;<\/strong><a href=\"https:\/\/www.nipsacademy.com\/blogs\/functions-in-c-language\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>functions<\/strong><\/a><strong>&nbsp;can be used.<\/strong><\/p>\n\n\n\n<p><strong>If we use any function and respective header file related with that function not included in program then compiler generates prototype error.<\/strong><\/p>\n\n\n\n<p><strong><ins>There are various header files in C++ which contains<a href=\"https:\/\/www.nipsacademy.com\/blogs\/functions-in-c-language\/\" target=\"_blank\" rel=\"noreferrer noopener\">&nbsp;functions<\/a>&nbsp;definition .<\/ins><\/strong><\/p>\n\n\n\n<p><strong><ins>for example<\/ins><\/strong><\/p>\n\n\n\n<p><strong><ins>#include&lt;iostream.h&gt;<\/ins><\/strong><\/p>\n\n\n\n<p><strong><ins>contains the method related to input output like cin, cout\u2026..<\/ins><\/strong><\/p>\n\n\n\n<p><strong><ins>#include&lt;conio.h&gt;<\/ins><\/strong><\/p>\n\n\n\n<p><strong><ins>contains the method related to console input output like clsrscr(), getch(), etc..<\/ins><\/strong><\/p>\n\n\n\n<p><strong><ins>#include&lt;math.h&gt;<\/ins><\/strong><\/p>\n\n\n\n<p><strong><ins>contains the method related to mathematics like sqrt( ), pow(), etc\u2026<\/ins><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this topic we are going to learn How to create own&nbsp;header file&nbsp;in c++ in very easy steps. As we know that Header file is a file that contains the definition of&nbsp;functions or methods. It has extension .h by default. If we write header files in a program then their respective&nbsp;functions&nbsp;can be used. If we [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":444,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,5,3,9,7,8,6],"tags":[],"class_list":["post-443","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-11th-computer-science","category-12th-computer-science","category-bca","category-cbse-12th-computer-science","category-cbse","category-jac-12th-computer-science","category-jac"],"_links":{"self":[{"href":"https:\/\/aipsacademy.com\/blogs\/wp-json\/wp\/v2\/posts\/443","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/aipsacademy.com\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/aipsacademy.com\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/aipsacademy.com\/blogs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/aipsacademy.com\/blogs\/wp-json\/wp\/v2\/comments?post=443"}],"version-history":[{"count":1,"href":"https:\/\/aipsacademy.com\/blogs\/wp-json\/wp\/v2\/posts\/443\/revisions"}],"predecessor-version":[{"id":445,"href":"https:\/\/aipsacademy.com\/blogs\/wp-json\/wp\/v2\/posts\/443\/revisions\/445"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/aipsacademy.com\/blogs\/wp-json\/wp\/v2\/media\/444"}],"wp:attachment":[{"href":"https:\/\/aipsacademy.com\/blogs\/wp-json\/wp\/v2\/media?parent=443"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/aipsacademy.com\/blogs\/wp-json\/wp\/v2\/categories?post=443"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/aipsacademy.com\/blogs\/wp-json\/wp\/v2\/tags?post=443"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}