About C functions clrscr, delay. Cannot be found?

Status
Not open for further replies.

aditya.shevade

Console Junkie
Hi

I have a question. I have been using turboc C for some time now. I heard that DevCPP is better, so now I am using it on Windows. And on linux, I am using Anjuta that comes with opensuse 10.2

Now the problem is that, the function clrscr, used to clear the screen is not avalable in both of them. And the function delay, used to delay the processing (time.h) is also not avalable. So are there any alternate functions that can be used to do these/ perform these operations?

Aditya
 

khattam_

Fresh Stock Since 2005
aditya.shevade said:
Hi

I have a question. I have been using turboc C for some time now. I heard that DevCPP is better, so now I am using it on Windows. And on linux, I am using Anjuta that comes with opensuse 10.2

Now the problem is that, the function clrscr, used to clear the screen is not avalable in both of them. And the function delay, used to delay the processing (time.h) is also not avalable. So are there any alternate functions that can be used to do these/ perform these operations?

Aditya

I'm planning to leave TC and go to devC++ too....

I think copying the respective header files from TC to devC++ include folder with a different name (eg: stdio1.h for stdio.h) and including that file (stdio1.h) using #include might help....
 
OP
aditya.shevade

aditya.shevade

Console Junkie
Yes it might be possible, but I think there must be some other way, because in the case what you have suggested, what if gcc or mingw does not support that? I have no idea if it will work or not, but let me try.

Aditya
 
AFAIK delay() is defined in dos.h (talkin bout Turbo Cpp)
Also try to check the settings in Options>>Directories..Set it to the right path if it is not pointing to the right path (where ur .h files are located)..

May be that should help.. :)
Or if it duznt, then reinstall it.. ;)
 
OP
aditya.shevade

aditya.shevade

Console Junkie
MysticDews said:
AFAIK delay() is defined in dos.h (talkin bout Turbo Cpp)
Also try to check the settings in Options>>Directories..Set it to the right path if it is not pointing to the right path (where ur .h files are located)..

May be that should help.. :)
Or if it duznt, then reinstall it.. ;)

Ahh.. I am sorry, My mistake. It is in dos.h. But sill devcpp says that delay should be defined before using it. And you do not have dos.h file in anjuta (linux). So any other ideas?

And about clrscr, all the header files get included. It's just that the function prototype is not avalable.

Aditya
 

tuxfan

Technomancer
Have a look at *www.mailnspace.com/download/c.source/

These are some old C functions and .h files made by me. It also includes a clrscr() substitute :p It was all under DOS. But you can see the logic and make your own ones for Windows. There is one sample calendar application that used these functions and header files :)
 

Thor

Ambassador of Buzz
its true , i hv used DevCpp but they will give error if u use clrscr() !

I hv faced this problem earlier and the bloodshed.net FAQ is of no help too.
So I checked this *www14.brinkster.com/aditsu/dev-cpp-faq.html#conio
`clrscr' undeclared (first use this function)
[Linker error] undefined reference to `clrscr'
Why can't I use conio.h functions like clrscr, gotoxy etc?
First you should note that conio.h is a Borland extension, NOT a standard header, so Dev-C++ and MinGW are in no way required to support it. The MinGW included with Dev-C++ 4.9.9.1 comes with a very reduced version of conio.h (no clrscr, gotoxy, etc); if you need more then you can use the native Windows console functions.
I also provide and maintain an updated version of conio (and also winbgim) at *www14.brinkster.com/aditsu/console/; that may be what you are looking for.
 
Status
Not open for further replies.
Top Bottom