|
-
Nov 17th, 2000, 09:02 PM
#1
Thread Starter
Addicted Member
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.
-
Nov 18th, 2000, 09:15 AM
#2
Monday Morning Lunatic
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
-
Nov 18th, 2000, 09:33 PM
#3
Thread Starter
Addicted Member
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|