Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    New Coder
    Join Date
    Nov 2008
    Location
    delhi
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question c program of graphics

    hi...i desperately need a project in C that involves use of graphics..
    plz help.. i m a newbie..

  • #2
    Regular Coder mjlorbet's Avatar
    Join Date
    Jan 2008
    Location
    Milwaukee, WI
    Posts
    724
    Thanks
    8
    Thanked 96 Times in 95 Posts
    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

  • #3
    New Coder
    Join Date
    Nov 2008
    Location
    delhi
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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 07:07 PM.

  • #4
    Regular Coder mjlorbet's Avatar
    Join Date
    Jan 2008
    Location
    Milwaukee, WI
    Posts
    724
    Thanks
    8
    Thanked 96 Times in 95 Posts
    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

  • #5
    New Coder
    Join Date
    Nov 2008
    Location
    delhi
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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?

  • #6
    Regular Coder mjlorbet's Avatar
    Join Date
    Jan 2008
    Location
    Milwaukee, WI
    Posts
    724
    Thanks
    8
    Thanked 96 Times in 95 Posts
    sure, post your code
    -Mike
    "Want me to precludify him, like some kind of dispatcherator?... Can do!" -Bender

  • #7
    New Coder
    Join Date
    Nov 2008
    Location
    delhi
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts
    (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();
    }

  • #8
    New to the CF scene
    Join Date
    Jan 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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"


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •