still problem with graphics SORRY

This is a discussion on still problem with graphics SORRY within the C Programming forums, part of the General Programming Boards category; still get linker errors as stated before I have no idea why. #include<conio.h> #include<stdio.h> #include"graphics.h" #include<stdlib.h> int main() { struct ...

  1. #1
    Unregistered
    Guest

    Angry still problem with graphics SORRY

    still get linker errors as stated before I have no idea why.

    #include<conio.h>
    #include<stdio.h>
    #include"graphics.h"
    #include<stdlib.h>

    int main()
    {
    struct point
    {
    int x;
    int y;
    };

    struct point coordinates;

    int gdriver=DETECT,gmode;
    int errorcode;

    initgraph(&gdriver,&gmode,"c:\\tc\\bgi");

    errorcode=graphresult();

    if(errorcode!=0)
    {
    printf("major error %s",grapherrormsg(errorcode));
    getch();
    exit(1);
    }

    coordinates.x=9;
    coordinates.y=38;

    putpixel(coordinates.x,coordinates.y,5);

    getch();
    return 0;
    }

  2. #2
    Ethereal Raccoon Procyon's Avatar
    Join Date
    Aug 2001
    Posts
    189
    Are you using Borland C/C++ v3.1?

    Go (on the main menu) to [Options]. Select [Linker], and then [Libraries...]. Check the box by Graphics Library, and you should be set.

  3. #3
    Unregistered
    Guest
    BIG THANKS procyon this works but makes my screen jump to full screen any ideas to run this in a window.

    thanks for your help once again.

  4. #4
    Just one more wrong move. -KEN-'s Avatar
    Join Date
    Aug 2001
    Posts
    3,230
    I don't think you can...because when you switch to graphics mode you usually automatically switch into a screen mode like 800x600 and your program fills the screen.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Beginning Game Programming Type Books
    By bumfluff in forum Game Programming
    Replies: 36
    Last Post: 09-13-2006, 04:15 PM
  2. Laptop Problem
    By Boomba in forum Tech Board
    Replies: 1
    Last Post: 03-07-2006, 05:24 PM
  3. Graphics Programming :: Approach and Books
    By kuphryn in forum Windows Programming
    Replies: 4
    Last Post: 05-11-2004, 08:33 PM
  4. binary tree problem - help needed
    By sanju in forum C Programming
    Replies: 4
    Last Post: 10-16-2002, 05:18 AM
  5. Graphics Problem
    By drdroid in forum C++ Programming
    Replies: 5
    Last Post: 02-27-2002, 01:37 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21