Thank you,
Now back to my original question. I was wondering what a header file does. Since I know now that it couldn't work direcly with my hardware, it must work according to the opperating system I am using.
In that case, one header file should work for any computer with the same opperating system. Right?
Here is a code I was going to try, but I didn't know anything about where to get the header files, or even what they do. I have used include files when working with micro controllers. They list the contents of the specific microcontroller. Is that the basic idea of a header file, does it list the elements of the opperating system so I can work easily with it?
Code:
#include <graphics.h>
#include <stdlib.h>
#include <stdio.h>
#include <conio.h>
int main(void)
{
/* request auto detection */
int gdriver = DETECT, gmode, errorcode;
/* initialize graphics mode */
initgraph(&gdriver, &gmode, "");
/* read result of initialization */
errorcode = graphresult();
if (errorcode != grOk) /* an error occurred */
{
printf("Graphics error: %s\n", grapherrormsg(errorcode));
printf("Press any key to halt:");
getch();
exit(1); /* return with error code */
}
/* draw a line */
line(0, 0, getmaxx(), getmaxy());
/* clean up */
getch();
closegraph();
return 0;
}