A man in rain - Graphics programming in ubuntu - Graphics & Multimedia Lab - C++ Program

A Man In Rain ...
 Graphics programming in ubuntu - Graphics & Multimedia Lab - C++ Program

Source code:
#include<iostream>
#include<graphics.h>
using namespace std;
int main()
{
 int gd=DETECT,gm,x,y,j,i;
 initgraph(&gd,&gm,NULL);

 outtextxy(150,15, "A man in rain... ");

 int points[]={51,101,151,101,150,getmaxy(),50,getmaxy(),51,101 };

 for(i=0;i<getmaxy()-10;i+=25)
 for(j=0;j<getmaxx()-10;j+=30)
  line(j,i,j+10,i+10);

 arc(100, 100, 135, 315, 50);
 line(50,100,135,63);

 setcolor(BLACK);
 fillpoly(5,points);
 setcolor(WHITE);
 line(95,78,135,175);
 arc(115, 185, 315, 495, 22);
 
 circle(120,130,15);
 line(120,145,120,250);
 line(120,250,100,280);
 line(120,250,140,280);
 line(120,170,100,200);
 line(120,170,140,200);

 getch();
 closegraph();
 return 0;
}


Output:
nn@linuxmint ~ $ g++ g8.cpp -lgraph
g8.cpp: In function ‘int main()’:
g8.cpp:9: warning: deprecated conversion from string constant to ‘char*’
nn@linuxmint ~ $ ./a.out
a.out: ../../src/xcb_io.c:249: process_responses: Assertion `(((long) (dpy->last_request_read) - (long) (dpy->request)) <= 0)' failed.
Aborted
nn@linuxmint ~ $


2 comments:

  1. The numerous ideas make your wedding big, different and exclusive from other ceremonies in Pune. People participate in their happiness and give blessings. We provide best arrangements from hiring wedding planner services. These can assist in selecting making food arrangements, wedding theme, groom outfit, and looking after the bride etc. Wedding planning becomes fun within ample budgets and talent for that. All the innovative and existing ideas are planned to favor professional task. Every planners desires to have a perfect wedding plan for them
    http://www.aavishkaarevents.com/

    ReplyDelete
  2. Amazing Blog. Love the content.
    I found i more useful website for programming Programiz Please do visit.

    ReplyDelete

Related Posts Plugin for WordPress, Blogger...