Forum     

Go Back   Digit Technology Discussion Forum > Portables, Peripherals and Electronics > QnA (read only)
Register FAQ Calendar Mark Forums Read

QnA (read only) Mods please help transfer the contents of this forum to proper sections. :)


 
 
LinkBack Thread Tools Search this Thread Display Modes
Old 24-01-2007, 11:22 PM   #1 (permalink)
Console Junkie
 
aditya.shevade's Avatar
 
Join Date: Jun 2006
Location: USA
Posts: 991
Default About C functions clrscr, delay. Cannot be found?


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
__________________
--- Console Junkie
aditya.shevade is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 24-01-2007, 11:51 PM   #2 (permalink)
Fresh Stock Since 2005
 
Join Date: Feb 2005
Posts: 1,015
Default Re: About C functions clrscr, delay. Cannot be found?

Quote:
Originally Posted by aditya.shevade
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....
__________________
http://www.khattam.info
khattam_ is offline  
Old 24-01-2007, 11:55 PM   #3 (permalink)
Console Junkie
 
aditya.shevade's Avatar
 
Join Date: Jun 2006
Location: USA
Posts: 991
Default Re: About C functions clrscr, delay. Cannot be found?

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
__________________
--- Console Junkie
aditya.shevade is offline  
Old 24-01-2007, 11:57 PM   #4 (permalink)
 
MysticDews's Avatar
 
Join Date: Nov 2006
Location: Mumbai
Posts: 98
Default Re: About C functions clrscr, delay. Cannot be found?

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..
__________________
________________________________________________
In love with my Mac 
________________________________________________
MysticDews is offline  
Old 25-01-2007, 12:14 AM   #5 (permalink)
Console Junkie
 
aditya.shevade's Avatar
 
Join Date: Jun 2006
Location: USA
Posts: 991
Default Re: About C functions clrscr, delay. Cannot be found?

Quote:
Originally Posted by MysticDews
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
__________________
--- Console Junkie
aditya.shevade is offline  
Old 25-01-2007, 04:16 PM   #6 (permalink)
Human Spambot
 
tuxfan's Avatar
 
Join Date: Feb 2004
Location: Mumbai
Posts: 2,653
Default Re: About C functions clrscr, delay. Cannot be found?

Have a look at http://www.mailnspace.com/download/c.source/

These are some old C functions and .h files made by me. It also includes a clrscr() substitute 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
__________________
:: Free hosting and free domain names available in special cases. Conditions apply ::
tuxfan is offline  
Old 25-01-2007, 09:45 PM   #7 (permalink)
In The Zone
 
Thor's Avatar
 
Join Date: Jun 2004
Location: Kolkata
Posts: 384
Default Re: About C functions clrscr, delay. Cannot be found?

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 http://www14.brinkster.com/aditsu/de...faq.html#conio
Quote:
`clrscr' undeclared (first use this function)
[Linker error] undefined reference to `clrscr'
Why can't I use conio.h functions like clrscr, gotoxy etc?
Quote:
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 http://www14.brinkster.com/aditsu/console/; that may be what you are looking for.
__________________
Beware of my Wrath Mortals, Thou hast no choice.
Thor is offline  
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


 
Latest Threads
- by gforz
- by clmlbx
- by Sujeet

Advertisement




All times are GMT +5.5. The time now is 03:49 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2