How to use graphic.h

I need to know a code about graphic.h

pls tell me what to do tnx, Anddd my classmate said that i need a software or something to e able to use graphic.h

im going to use it to give graphics to the code rock paper scissors
Well if you're happy with 640x480 resolution and 16 colours, then you'll need
- https://www.dosbox.com/
- Some copy of TurboC (I've no idea if this is legit free anywhere, try Borland's museum).

M$ pretty much gave up trying to support DOS some 20 years ago, so chances of getting 16-bit code to work on your shiny new OS are slim to zero.


But if you want to live in the 21st century, then https://www.libsdl.org/ is a good place to start.
Hmmm salem

im using Code blocks as IDE , what kind of software then?
I am not familiar with this

What are the aspects i need to know what is the applicable to the project i want to make and hte IDE i using ,the language is c++
i got WinBGim what is that?
If you are looking for the modern day ability to manipulate terminal output, NCURSES.

For the Windows equivalent, PDCurses.

https://pdcurses.sourceforge.io/
AHh i dont familiar what i really need
i
Sooo again Im using

C++ language
IDE Code Blocks

- Project -
Rock paper Scissors


I need to use graphic h for that
Doneee with that already got the Library

Sooooo how to make a Rock graphics then?
Easiest way, if you have any artistic skills (I don't) is to create a picture of a rock and save it as an image file (.jpg/.bmp/.gif for example)

Use WinBGIm's readimagefile() function to read the file and place it where you want.
https://www.cs.colorado.edu/~main/cs1300/doc/bgi/readimagefile.html

I don't use outdated libraries like WinGBIm, so any further help I can't give you. I had to do a web search for even that little tidbit.

Any graphics I need I create a Win32 app and use one of the Win32 API graphics system. GDI, GDI+ or even Direct2D.
void readimagefile(

const char* title=NULL,

int left=0, int right=0, int right=INT_MAX, int bottom=INT_MAX

);

am i going to paste this?
You tell us.

What does "how to make a Rock graphics" mean?
Hmmmmm WELLL I JUST IMAGINING IT HAHAHAHAHA


Hereeee

You are familiar with the game right?
i assume


So whennn the player choose rock to play it cout/ something a rock graphics I dont know. Not familiar with the graphics.h
I'm guessing that you mean something like "I want to know how to put a picture of a rock on the screen"?
Yeahhhhh Thats righttttt

Can you help me?
If you are willing to help pls can you send the code for that???


rock pic
scissor pic
paper pic

the thing ican put them on


plssss hahahaha


Sorry for the long collection of random responses.

For a working graphics.h library on windows, google "duthomhas github WinBGIm". It comes with two example programs and a batch file to help you compile stuff.

For further documentation and help, google "winbgim documentation" and you'll get the university's site.

To use an image, as noted above, you must first call the readimagefile() function to get it on the window. Then you must use imagesize() to get the memory you need to malloc(), then getimage() to save it in that memory. After that you can use putimage() to draw the image anywhere you want.

Remember, Google is your friend for examples.

BGI graphics are very old, but very easy to use as well.
Good luck!
ARgggggggggg i wishhhhhhhhhh i learnnnnnnnnnn lot of stuff

btw thanksssssss alottt


Andddddddddd im having trouble

with that , (the set up or idnnuo part, the part ineed to do with files of win Coz when i try some code for arc, or coundown it doesnt appear on screen )


i Dont know theeee thing is all related thing about grphics.h is 4 years ago

andddd its for hard to me im just a beginner i dont understand stuff i just rely in Youtube and to all of you answering me

Sometimes i dont know how to ask because i dont know the right term for what im asking

TNX everyone for helpingg

I give up for now
Topic archived. No new replies allowed.