Results 1 to 3 of 3

Thread: Frustrated!!

  1. #1

    Thread Starter
    Addicted Member Stephen Bazemore's Avatar
    Join Date
    Aug 2000
    Location
    North Carolina
    Posts
    158
    Ok, I can't seem to figure out why this is not working. Here is the snippet that I'm having trouble with.

    Code:
    #include <conio.h>
    #include <string.h>
                    
    void keypress();
    
    void main()
    {
    
    clrscr();
    keypress();
    
    }
    
    void keypress()
    {
    textcolor(14);
    gotoxy(35,13);
    cprintf("Are you sure you want to continue?");
    getch();
    }
    And here is the errors that my compiler is giving me.

    copy.cpp(9) : error C2065: 'clrscr' : undeclared identifier

    copy.cpp(16) : error C2065: 'textcolor' : undeclared identifier

    copy.cpp(17) : error C2065: 'gotoxy' : undeclared identifier

    Any ideas what is wrong? Even with the errors that the compiler is giving me I know that code is right. Or at least I think it is.

    Any help is appreciated.

    Thanks.

    Stephen Bazemore
    Email:[email protected]

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    You appear to be using Visual C++. Unfortunately, VC doesn't come with any graphics libraries, so you'd have to find one from somewhere. If you ask someone with Borland C++ 5, then they'll have the headers and libraries and hopefully it should be possible to get something working.

    Either way, with BC++ you'd have to include <graphics.h> anyway.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3

    Thread Starter
    Addicted Member Stephen Bazemore's Avatar
    Join Date
    Aug 2000
    Location
    North Carolina
    Posts
    158
    Yea, thanks parksie. I did compile it with borland, and it compiled fine with 0 errors. So I may not use vc++ anymore.. I kind of like borland anyway.

    But thanks for the reply.

    Stephen Bazemore
    Email:[email protected]

Posting Permissions

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



Click Here to Expand Forum to Full Width