Quantcast

A community for students. Sign up today!

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

zordoloom

  • 2 years ago

How do I make a program in standard C which uses graphics.h. What I mean is, how do I run a code that includes graphics.h in the header file. For some reason Visual Studio doesn't accept this and outputs some error. Can Someone please help?

  • This Question is Closed
  1. Cynosure-EPR
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 1

    Which IDE are you using?

  2. zordoloom
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    I'm using Microsoft visual studio.

  3. andrew.m.higgs
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    What does the error say?

  4. Cynosure-EPR
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 1

    What specific version and what is the error your getting? It is my understanding that Microsoft Visual Studio does not have a 'graphics.h' file. With "#include "graphics.h" you include a header file of a library into your code, but the header file must be in the include paths associated with Visual Studio. You can set additional include paths in the project properties within Visual Studio by right clicking on project in the project explorer and going to Properties ->Additional Include directories. Even then, I'm not sure if it will successfully support the file. Only trial and error will tell.

  5. zordoloom
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    Okay, so say I was to run the code from this website: http://www.c.happycodings.com/Games_and_Graphics/code31.html It has the header file graphics.h, does that still mean it won't work in Visual Studios?

  6. Cynosure-EPR
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 1

    I don't see the "graphics.h" file on that website. I can see the main source, but "graphics.h" is only included--the source itself is not provided. The only way I could tell you that would be to get a hold of the "graphics.h" source file and try it out.

  7. zordoloom
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    What i'm trying to say is that it's included in the code. If I had the graphics.h source file, how would I get it to still work in visual studios. Or would the graphics.h source file not be enough? Would It require some other files?

  8. zordoloom
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    Is there something else that is used in Visual studios that allows graphic programming?

  9. Cynosure-EPR
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 1

    If you have the "graphics.h" file, you would do as I suggested in one of the answers above. I've quoted it for you again here: ""#include "graphics.h" you include a header file of a library into your code, but the header file must be in the include paths associated with Visual Studio. You can set additional include paths in the project properties within Visual Studio by right clicking on project in the project explorer and going to Properties ->Additional Include directories." However, this does not ensure that it will work. You simply need to try it and see.

  10. zordoloom
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    Thanks!

  11. Cynosure-EPR
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 1

    Anytime!

  12. Not the answer you are looking for?
    Search for more explanations.

    Search OpenStudy
    • Attachments:

Ask your own question

Ask a Question
Find more explanations on OpenStudy

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...

23

  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.