Thread: Geeting error in using graphics.h header file as shown in attachment.

  1. #1
    Registered User Rakesh o_O's Avatar
    Join Date
    Jun 2012

    Geeting error in using graphics.h header file as shown in attachment.

    i am running turbo c++ 4.5 in windows xp mode in windows 7.

    Geeting error in using graphics.h header file as shown in attachment.-25-mar-13-3-01-23-pm-jpg

  2. #2
    Registered User
    Join Date
    Sep 2006
    I believe the error message is correct - you have to go back to ACTUAL Windows XP (or Windows 2000) to run BGI graphics. They decided not to support BGI graphics because it was considered obsolete, is what I heard.

    However, you should be able to answer this definitively with a quick Google search. I'm not a Windows 7 guru, certainly.

    As soon as you can, I'd move over to a modern compiler - there are a few good and free ones. You will really enjoy the capability they give you on Windows 7.

  3. #3
    Registered User ledow's Avatar
    Join Date
    Dec 2011
    Because BGI graphics interacted with the screen directly. That's a lot more complex under something like Windows (because you DON'T have exclusive access to the screen, you don't know what driver the screen is using, they may not even be VESA/VGA compatible, and security-wise it's a nightmare) and so it's not allowed. Even in "XP Mode", which is basically an emulator, you can't use something that was originally designed for DOS-mode graphics (which predate XP by some decade or more).

    Turbo-C++ v5 apparently supported Windows by having a bit of a rewrite, but honestly that was last used in 1997 (so only 16 years old!).

    Try stopping running a compiler from 1992 on a Windows 7 machine, and get something vaguely modern. What you just asked is why can't you use the engine from a Ford Model T to power a 2013 Ford Fusion?

    There are several dozen free C++ compiler/IDE suites on Windows. Use one that was released in this millennium (at least), and problem solved.

    - Compiler warnings are like "Bridge Out Ahead" warnings. DON'T just ignore them.
    - A compiler error is something SO stupid that the compiler genuinely can't carry on with its job. A compiler warning is the compiler saying "Well, that's bloody stupid but if you WANT to ignore me..." and carrying on.
    - The best debugging tool in the world is a bunch of printf()'s for everything important around the bits you think might be wrong.

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  5. #5
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    i am running turbo c++ 4.5 in windows xp mode in windows 7.
    You are running a virtual environment created in 2001 under an operating system released in 2009 just to run a tool created in 1995 that builds software primarily for an operating system that was basically abandoned as a real product the following year?



Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Intro for graphics header file in c
    By balaKannan in forum C Programming
    Replies: 2
    Last Post: 12-15-2010, 01:12 PM
  2. New to C++, Header File Error
    By kspill2 in forum C++ Programming
    Replies: 2
    Last Post: 09-09-2007, 02:34 PM
  3. header file error
    By beon in forum C Programming
    Replies: 7
    Last Post: 11-16-2006, 07:33 AM
  4. Graphics header file
    By QuincyEQ in forum C++ Programming
    Replies: 1
    Last Post: 05-04-2002, 02:38 PM
  5. Graphics header file problem
    By Senkoma in forum C++ Programming
    Replies: 1
    Last Post: 09-04-2001, 05:26 PM