C++ extensions | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

C++ extensions

Does ".h" extension work in Dev C++ and Visual studio code ?

2nd Dec 2020, 12:52 PM
codecraft
codecraft - avatar
4 Answers
+ 4
codecraft , according to c++ standards, standard c++ headers(like iostream.h) would use include directives without ".h" extensions (decision was taken around 2002) So if you are using a standard compiler then ideally you should not be able to do it ( some generate a warning while others generate error )
2nd Dec 2020, 2:12 PM
Arsenic
Arsenic - avatar
+ 3
codecraft vscode is a text-editor. It is used just to write to code. Install c/c++ extension for vscode to get syntax highlighting. It depends on your compiler weather ".h" will work or not.
3rd Dec 2020, 2:01 AM
🇮🇳Vivek🇮🇳
🇮🇳Vivek🇮🇳 - avatar
+ 2
How exactly you want to use it ? 1) while including a header in your program file ? ( User-defined or sdandard ?) 2) or while creating a header file of your own ?
2nd Dec 2020, 1:07 PM
Arsenic
Arsenic - avatar
+ 2
@Arsenic I want use standard header like #include<iostream.h>or #include<math.h> or #include<conio.h> etc
2nd Dec 2020, 1:16 PM
codecraft
codecraft - avatar