Hi Geekyard readers,I like to share my c++ coding to draw a winking face.Just have some fun with these codings.
// WINKSUB.CPP
// Wink
// Created by Karhik Sampath on 6/13/08.
// Copyright 2008 ,Karthik . All rights reserved.
// The copyright to the computer program(s) herein
// is the property of Karthik Sampath ,India. The
// program(s) may be used and/or copied only with the
// written permission of Karthik Sampath or in accordance
// with the terms and conditions stipulated in the
// agreement/contract under which the program(s) have
// been supplied. This copyright notice must not be
// removed.
// Published in www.geekyard.com
#include<graphics.h>
#include<stdlib.h>
#include<conio.h>
void main()
{
int suymid,suxmid;
int r,i;
int gdriver = DETECT, gmode, errorcode;
initgraph(&gdriver, &gmode, “”);
suxmid=250;
suymid=250;
setcolor(15);
setfillstyle(1,15);
bar(1,1,700,500);
setcolor(0);
setfillstyle(1,0);
bar(5,5,630,470);
//face
setcolor(15);
setfillstyle(1,15);
fillellipse(suxmid,suymid,200,200);
setcolor(0);
setfillstyle(1,0);
fillellipse(suxmid-80,suymid-40,40,70);
for(i=0;i<5;i++)
arc(suxmid+80,suymid+i,30,160,50);
for(i=0;i<5;i++)
arc(suxmid,suymid+40+i,200,340,100);
setcolor(15);
setfillstyle(1,15);
fillellipse(suxmid-55,suymid-40,15,45);
getch();
}
Enjoy !!!
Hi. I don’t know a thing about C++, but this looks very cool. Nice post!
Regards, JT.
Hey very nice blog!!
I loved your article.Much thanks again. Want more.
Great site and nice text.
this article is exactly what i’ve been looking for! I found your article bookmarked by a friend of mine. I will also share it. thanks!