c languge problem

Discussion in 'C++' started by new programmer, Dec 8, 2006.

  1. hi iwould like to ask about how to use function ,pointers and graphics
    in c languge easily

    and thanks
     
    new programmer, Dec 8, 2006
    #1
    1. Advertising

  2. new programmer wrote:
    > hi iwould like to ask about how to use function ,pointers and
    > graphics in c languge easily


    You might want to consider posting to 'comp.lang.c' then.
     
    Victor Bazarov, Dec 8, 2006
    #2
    1. Advertising

  3. new   programmer

    Default User Guest

    new programmer wrote:

    > hi iwould like to ask about how to use function ,pointers and
    > graphics in c languge easily


    As Victor said, the C newsgroup is comp.lang.c. However, graphics
    capability is not part of the C language (or C++ either) and would be
    off-topic there. You'll need to find a newsgroup dedicated to your
    platform to select a graphics package.




    Brian
     
    Default User, Dec 8, 2006
    #3
  4. new   programmer

    Guest

    to use graphics in c u need to use the header file GRAPHICS.H along
    with the other header files. After u have included the header file u
    need to initialize the graphics mode by calling initgraph(). this
    function call requires (1) graphics mode , (2) Graphics Driver (use
    DETECT macro if u do not know which driver u support) and (3) ABSOLUTE
    location of bgi files.

    #include <graphics.h>
    #include <stdio.h>

    void main()
    {

    int gd = DETECT, gm;

    /* Initialize graphics mode by calling initgraph() */
    initgraph(&gd, &gm, "c:\\tc\\bgi");
    if (graphresult() != grOk)
    {
    printf("Error initializing the graphics mode");
    }
    else
    {
    /* start ur intended gaphics code*/
    }
    closegraph(); /* close the graphics mode*/
    }

    if the initilializationis succesful then you can use the various
    functions already available (putpixel, circle, line, ellipse etc) for
    doing the graphical operations u intend to do.
    if u want u can study the link
    http://www.developerfusion.co.uk/show/3653/10/ for details and other
    options available.

    -- Aachin
     
    , Dec 9, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andreas Suurkuusk
    Replies:
    0
    Views:
    3,982
    Andreas Suurkuusk
    Jul 27, 2003
  2. Ted Miller
    Replies:
    0
    Views:
    5,156
    Ted Miller
    Sep 13, 2003
  3. Merek
    Replies:
    0
    Views:
    1,964
    Merek
    Dec 3, 2003
  4. Scott Meddows
    Replies:
    1
    Views:
    392
    John Saunders
    Jun 8, 2004
  5. Mike

    Problem problem problem :( Need Help

    Mike, May 7, 2004, in forum: ASP General
    Replies:
    2
    Views:
    550
    Bullschmidt
    May 11, 2004
Loading...

Share This Page