Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

how do you use windows.h?

0 votes
asked Sep 2, 2018 by Yunwen Zhu (120 points)

There is a head file called windows.h that, I believe can be more powerful than stdio.h sometimes, I've been trying to use it, but every time I tried to run a code that has this head file within, this line will pop up:

main.c:4:20: fatal error: windows.h: No such file or directory
compilation terminated.
does it mean that I have to download something off the internet? or do I have to enable something from the website? I'm confused, if you have an answer, that will be great, thanks

3 Answers

0 votes
answered Sep 6, 2018 by Rithik Raj (220 points)
Actually I don't know about that header file window.h, if it exists , download the header file "windows.h" from google and place it in "INCLUDE" folder in our application folder.
+1 vote
answered Sep 7, 2018 by Leroy (390 points)
windows.h is a visual studio header, it will not work with any other operating system rather windows and its readily avialabe via visual studio community edition.

if your after windows specific header then opengl gl is one option, ogre 3d, wine for linux.

Windows.h allows you to change specific features like window size, text its not something you download as its built into either a library of key features or windows system its self that can be invoked by visual studio or a ide that is on a windows system.
commented Sep 15, 2018 by Yunwen Zhu (120 points)
t h a n k s m a n
0 votes
answered Sep 11, 2018 by anonymous
In addition to what the others said, try doing #include <windows> or #include <windows.h>

Sometimes it's a bit weird about that stuff.
commented Sep 24, 2018 by Yunwen Zhu (120 points)
I tried that many times and it didn't work
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...