Draw house using C++ graphic | c++ graphic interesting project

 Draw house using C graphic

How to draw House easy way, how to draw House using C graphic, Draw house, Draw house for kids, c++ graphic project, draw house using different shapes
C++ graphic use Draw house

Today we will see how to draw a house using the c ++ graphic. The code of this program is given below.


#include<iostream.h>

#include<conio.h>

#include<dos.h>

#include<stdlib.h>

#include<graphics.h>

void main()

{

int gd=DETECT,gm;

initgraph(&gd,&gm,"c:\\tc\\bgi");


line(0,450,750,450);


//Right ---------

rectangle(200,330,430,450);

rectangle(230,444,295,450);

rectangle(235,355,290,444);

circle(244,399,3);


rectangle(340,348,410,400);

rectangle(345,353,405,395);

line(375,353,375,395);


line(130,249,426,249);

line(430,330,445,330);

line(445,330,426,249);


rectangle(350,235,380,249);

rectangle(346,230,384,235);

//Left-----------

line(200,310,200,450);

line(40,310,40,450);


line(30,316,120,250);

line(210,316,120,250);


line(30,307,120,241);

line(210,307,120,241);


line(30,307,30,316);

line(210,307,210,316);


rectangle(70,350,170,400);

rectangle(75,355,165,395);


line(105,355,105,395);

line(135,355,135,395);


rectangle(100,290,140,320);

line(120,290,120,320);

line(100,305,140,305);

getch();

closegraph();


}