Go Back   CodingForums.com > :: Computing & Sciences > Computer Programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rating: Thread Rating: 5 votes, 4.20 average.
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-16-2008, 05:28 AM   PM User | #1
tanv@vice
New Coder

 
Join Date: Nov 2008
Location: delhi
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
tanv@vice is an unknown quantity at this point
Question c program of graphics

hi...i desperately need a project in C that involves use of graphics..
plz help.. i m a newbie..
tanv@vice is offline   Reply With Quote
Old 11-16-2008, 06:58 AM   PM User | #2
mjlorbet
Regular Coder

 
mjlorbet's Avatar
 
Join Date: Jan 2008
Location: Milwaukee, WI
Posts: 724
Thanks: 8
Thanked 96 Times in 95 Posts
mjlorbet will become famous soon enough
you need an idea for a project or you need somebody else's finished product? what version of c, what compiler are you using, are you looking for a project file for an IDE, and, if so, which one? if you're using borland products (in this day and age i really have to doubt it) but the BGI libraries are what i always used to use, but that was a very, very long time ago. ultimately, you really need to explain what you're looking for a lot better in order to get any useful help.
__________________
-Mike
"Want me to precludify him, like some kind of dispatcherator?... Can do!" -Bender
mjlorbet is offline   Reply With Quote
Old 11-16-2008, 07:10 AM   PM User | #3
tanv@vice
New Coder

 
Join Date: Nov 2008
Location: delhi
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
tanv@vice is an unknown quantity at this point
since i have to submit the project by tuesday..thr is hardly any time to code it myself...so i m looking 4 some1 who can give me his project idea or clue...i have just begun coding in c and it is really hard 4 me to code specailly graphics tht too animation...i m working on turbo c.plz give ne tips 4 the project.

Last edited by tanv@vice; 11-16-2008 at 06:07 PM..
tanv@vice is offline   Reply With Quote
Old 11-16-2008, 07:17 AM   PM User | #4
mjlorbet
Regular Coder

 
mjlorbet's Avatar
 
Join Date: Jan 2008
Location: Milwaukee, WI
Posts: 724
Thanks: 8
Thanked 96 Times in 95 Posts
mjlorbet will become famous soon enough
the rules of this forum explicitly prohibit us from giving direct answers to homework, much less giving our past projects to use as your assignment. we can, however give you advice and help you with questions you may have in doing your work yourself. also, asking for a graphics based program (which is in and of itself a very vague request) written in turbo c is not something that many people have laying around. i don't think i have any of my projects written in anything before BCPP 4.02 anymore, i doubt many here, or elsewhere, will have anything much older than that still archived. again, i am sorry.
__________________
-Mike
"Want me to precludify him, like some kind of dispatcherator?... Can do!" -Bender
mjlorbet is offline   Reply With Quote
Old 11-16-2008, 08:02 AM   PM User | #5
tanv@vice
New Coder

 
Join Date: Nov 2008
Location: delhi
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
tanv@vice is an unknown quantity at this point
ya nevr mind...
by the way i tried a program... but it has errors ... some of them r troubling me...can u help me with tht?
tanv@vice is offline   Reply With Quote
Old 11-16-2008, 08:07 AM   PM User | #6
mjlorbet
Regular Coder

 
mjlorbet's Avatar
 
Join Date: Jan 2008
Location: Milwaukee, WI
Posts: 724
Thanks: 8
Thanked 96 Times in 95 Posts
mjlorbet will become famous soon enough
sure, post your code
__________________
-Mike
"Want me to precludify him, like some kind of dispatcherator?... Can do!" -Bender
mjlorbet is offline   Reply With Quote
Old 11-16-2008, 08:22 AM   PM User | #7
tanv@vice
New Coder

 
Join Date: Nov 2008
Location: delhi
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
tanv@vice is an unknown quantity at this point
(here it is)
#include<stdio.h>
#include<conio.h>
#include<dos.h>
#include<stdlib.h>
#include<graphics.h>
#define PATH "c:\tc\bgi\"
void main()
{
int i,j,k,hour,min,g,y=1;
char msg[80];
int gd=DETECT,gm; /* GRAPHICS INITIALIZATION*/
initgraph(&gd,&gm,PATH); /*THE PATH SHOULD BE GIVEN*/
struct dostime_t t; /* GETS THE SYSTEM TIME */
_dos_gettime(&t);
setcolor(14);
sprintf(msg,"The current time is: %d %02d %02d", t.hour,
t.minute,t.second);
outtextxy(150,50,msg);
outtextxy(40,100,"GIVE ONLY THE HOUR AND MINUTE YOU WANT TO SET THE
ALARM(hh,mm)");
outtextxy(97,149,"HOUR:");
gotoxy(19,10);
scanf("%d",&hour); /*GETS THE HOUR AND SECOND TO SET THE ALARM*/
outtextxy(85,198,"MINUTE:");
gotoxy(20,13);
scanf("%d",&min);
outtextxy(485,400,"tanvi");
outtextxy(460,430,"jp UNIVERSITY");
if( t.hour > hour ) goto b;
else if(hour == t.hour && min<=t.minute ) goto b;
else
{
for(i=t.hour;i<=hour;i++)
{
for(j=t.minute;j<60;j++)
{
k=0;
while(k<60)
{
cleardevice();
k++;
setfillstyle(1,1);
bar(510,170,90,230);
settextstyle(1,0,3);
sprintf(msg,"%d %d %d",i,j,k);
outtextxy(230,188,msg);
sound(1000);
delay(100);
nosound();
sleep(1);
if(j==min && i==hour)
{
cleardevice();
while(!kbhit())
{
delay(300);
sound(1000);
setcolor(y);
outtextxy(250,200,"WAKE UP");
delay(300);
nosound();
y++;
}
goto a;
}}}}}
a:
getch();
exit(0);
b:
cleardevice();
outtextxy(250,250,"INVALID TIME");
getch();
}
tanv@vice is offline   Reply With Quote
Old 01-20-2009, 06:35 PM   PM User | #8
sanasarwat
New to the CF scene

 
Join Date: Jan 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
sanasarwat is an unknown quantity at this point
c graphics

hi i am in a desperate need of a code to develop a screen,any screen it could be a welcm pg USING C GRAPHICS ON DOS PLATFORM wil u plz help me out wth d code,n the page should hv three buttons at d botttom as "next ,help n quit"
sanasarwat is offline   Reply With Quote
Reply

Bookmarks

Tags
c program, graphics

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:10 AM.


Advertisement
Log in to turn off these ads.