header help

Hi to all, I am new here. I downloaded from this site .C file and when i try to start it in VS 2008 it displays error "Cannot open include file: 'graphics.h". Where can i find this header and how can I add it to project?

Comments

  • Graphics.h is part of the ancient DOS graphics library BGI for Borland compilers. There is no way to run that from a modern Windows compiler nor from a non-Borland compiler. But since the library is obsolete since the introduction of Windows 14 years ago, there is probably no reason to use it either.
  • Thanks. But i have the same problem with some other header files like: curses.h, dir.h, alloc.h... I downloaded from programmers heaven C sourcecodes that contain these headers.

    Exemple: Address book v2.1
    [code]
    # include
    # include
    [b]# include [/b]
    # include
    # include
    [b]# include
      [/b]
      # include
      # include
      # include [/code]
      Rest of code...

      While compiling it displayes error that it cannot open header file.
      Is there a way to run these C sourcecodes on VS 2008?
      Do i need to upgrade my standard library?




  • : # include
    : # include
    : [b]# include [/b]
    : # include
    : # include
    : [b]# include
      [/b]
      : # include
      : # include
      : # include


      The only headers above that are standard C are stdio.h, string.h, stdlib.h and ctype.h. The rest are all non-standard headers. So strictly speaking, they are not legal C.

      So you aren't doing anything wrong, the program you have downloaded is an old, non-standard, non-portable one.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion