PDA

Click to See Complete Forum and Search --> : Frustrated!!


Stephen Bazemore
Nov 17th, 2000, 08:02 PM
Ok, I can't seem to figure out why this is not working. Here is the snippet that I'm having trouble with.


#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.

parksie
Nov 18th, 2000, 08:15 AM
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.

Stephen Bazemore
Nov 18th, 2000, 08:33 PM
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.