#include<graphics.h>
#include<iostream.h>
#include<stdlib.h>
#include<stdio.h>
#include<conio.h>
void main()
{
int gdriver=DETECT,gmode;
initgraph(&gdriver, &gmode, “c:\turboc3\bgi”);
//for head
ellipse(320,95,360,0,25,20);
line(298,85,341,85);
circle(310,90,2);
circle(330,90,2);
arc(320,100,200,-20,10);
//for neck
line(313,115,313,125);
line(328,115,328,125);
//For centre part
arc(320,225,72,107,100);
line(290,129,290,200);
line(350,129,350,200);
line(290,193,350,193);
line(290,200,350,200);
//for legs
line(290,200,285,280);
line(320,225,305,280);
line(322,225,335,280);
line(350,200,355,280);
//for right hand
line(290,129,255,165);
line(255,165,290,200);
line(290,149,275,165);
line(275,165,290,182);
//for left hand
line(350,129,385,165);
line(385,165,350,200);
line(350,149,365,165);
line(365,165,350,182);
//for shoes
line(285,280,275,287);
line(275,287,305,287);
line(305,280,305,287);
line(335,280,335,287);
line(335,287,365,287);
line(355,280,365,287);
//for name
settextstyle(2,HORIZ_DIR,4);
outtextxy(293,150,”The Crazy”);
outtextxy(292,160,”Programmer”);
getch();
closegraph();
}
please tell me how to compile and execute this
Hi Mukseh, i am telling you the steps to execute above program.
1. Copy the whole code given above.
2. Now open notepad and paste the code that you have copied.
3. Save it with a name, for example "program.cpp" , don't forget to add .ccp at the end of name.
4. Now copy the file to c:>tc>bin.
5. Open turbo c compiler and then open the file that you have just copied to bin folder.
6. Now press alt+f9 to compile and then press ctrl+f9 to run the program.
I hope this will help you.
this program is not run…only compile… how it is run…
Hi Rakesh
This program is 100% working, i have just run and compiled it. Just follow the steps that i have explained in above comment, you will surely able to run it.
Good source code
complied smoothly…
but not ruuning..
ERROR- initgraph not initialised.
Go to the link:
http://thecrazyprogrammer.blogspot.com/2012/08/complete-guide-to-run-any-program-from.html
Here you will find step by step guide to run graphics program. Hope this will help you.
anything doesn’t work even after opening form notepad and then in c++ it doesn’t work at all please can u
say an alternate method for making this program run
Dear sir, can you help me to explain which keywords are used to run this programme. Either they are user defined function or pre-defined function. Like ellipse, line , arc etc.
this programm can’t run in my turbo c++
when I compiles ,it says graphics.h library not found.
use turbo c++
graphics.h is not present i the dev
I think that I haven’t installed graphics.h lib , sir please tell me how to download graphics lib
Sir,
can you tell , how do you finding the coordintes points for drawing???
How to make this men move
Its It’s still not workingðŸ˜ðŸ˜ please help…
Every bady please onpen your harbor++ and then go to the option the to the linker then libraries then select graphics and the compile it and then run it
can you do same program using class and object?
How to write the numbers on our own which are used in this program under line(_, _, _, _) ??
I AM WORKING IN C++ GRAPHICS PROGRAMMING AND DEVELOPED A NUMBER OF GRAPHIC FIGURES, BUT, I AM UNABLE TO SAVE THESE AND PUT IN WORD DOCUMENT. CAN ANYBODY GUIDE ME TO ENABLE ME TO COMPLETE THIS TASK?