Forum     

Go Back   Digit Technology Discussion Forum > Software > Programming
Register FAQ Calendar Mark Forums Read

Programming The destination for developers - C, C++, Java, Python and the lot


Closed Thread
 
LinkBack Thread Tools Display Modes
Old 26-11-2008, 10:20 PM   #1 (permalink)
Right Off the Assembly Line
 
Join Date: Oct 2008
Posts: 7
Default Functions like gotoxy,delay,textcolor in c++ working in turbo C++ but not in dev c++


There are a few functions like gotoxy,delay,textcolor,clrscr and many others which run perfectly in turbo C++ but don't work at all in dev c++. I tried copying header files from turbo c++ directory into devC++ directory, but it makes things worse. Plz help.
aashish473 is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 26-11-2008, 10:35 PM   #2 (permalink)
Wahahaha~!
 
Faun's Avatar
 
Join Date: Dec 2006
Location: Pune/there
Posts: 7,676
Default Re: Functions like gotoxy,delay,textcolor in c++ working in turbo C++ but not in dev

Because Turbo C hates us
__________________
Blog | Flickr | Battlelog
Spoiler:
Asus Z68 V-Pro|i5 2500k|TRUE Black|Ripjaws X|U2311H|N560GTX|D7000|XONAR STX|RE272|RE0|CC51|XE200PRO Walnut| TD II V2| Ultraphile|N5800

Mono
Faun is offline  
Old 27-11-2008, 01:01 AM   #3 (permalink)
Commander in Chief
 
QwertyManiac's Avatar
 
Join Date: Jul 2005
Posts: 6,658
Default Re: Functions like gotoxy,delay,textcolor in c++ working in turbo C++ but not in dev

Quote:
Originally Posted by aashish473 View Post
There are a few functions like gotoxy,delay,textcolor,clrscr and many others which run perfectly in turbo C++ but don't work at all in dev c++. I tried copying header files from turbo c++ directory into devC++ directory, but it makes things worse. Plz help.
They are part of Turbo's own Windows-specific library functions. You can't find them in most other compilers like mingw32 (Dev-C++) which has a cross-platform library.
__________________
Harsh J
www.harshj.com
QwertyManiac is offline  
Old 27-11-2008, 01:56 AM   #4 (permalink)
Alpha Geek
 
Krazy_About_Technology's Avatar
 
Join Date: Jun 2004
Location: Noida - India
Posts: 765
Default Re: Functions like gotoxy,delay,textcolor in c++ working in turbo C++ but not in dev

^Those are not actually windows specific, but are borland specifc. Buddy, actually when you use the graphics routine provided in turbo C++, you are using what is know as Borland Graphics Interface. It is specific to borland compilers and wont be available in others. Standard C++ or C does not defines any graphics library as standard. So Borland created BGI for use with DOS based machines for simple graphics functionality. On Windows, GDI, Direct X and OpenGL are used for graphics functionality. These are much more powerful and complex than BGI and provide you with functionality to create both 2D and 3D graphics applications. OpenGL, as its name suggests, is an open technology and is also available on open operating systems like Unix and Linux.

Conio.h is also a dos specific file provided by borland and is not available on other compilers and hence the clrscr function. On Windows, you can either call the system function with cls command to clear screen, or search MSDN for a full fledged 32bit version of clrscr().

I hope this would have solved your confusion.
__________________
Dell Inspiron 1525 - C2D 2 Ghz, 3GB, 250GB, X3100 :)

Samsung Omnia Pro B7610 with Stock WM 6.1 ROM

Blog: http://www.sumitbhardwaj.co.in/blog
Krazy_About_Technology is offline  
Old 27-11-2008, 06:11 PM   #5 (permalink)
Commander in Chief
 
QwertyManiac's Avatar
 
Join Date: Jul 2005
Posts: 6,658
Default Re: Functions like gotoxy,delay,textcolor in c++ working in turbo C++ but not in dev

Quote:
Originally Posted by Krazy_About_Technology View Post
^Those are not actually windows specific, but are borland specifc.
Yes, as I said Turbo-provided (Dumbin' it down, ofc the messy work is all Borland's). It is also windows specific cause borland's compilers catered only to it. The same would not work on the UNIX or OS $ platforms.
__________________
Harsh J
www.harshj.com
QwertyManiac is offline  
Old 28-11-2008, 01:29 AM   #6 (permalink)
Alpha Geek
 
Krazy_About_Technology's Avatar
 
Join Date: Jun 2004
Location: Noida - India
Posts: 765
Default Re: Functions like gotoxy,delay,textcolor in c++ working in turbo C++ but not in dev

OK, i got it now
__________________
Dell Inspiron 1525 - C2D 2 Ghz, 3GB, 250GB, X3100 :)

Samsung Omnia Pro B7610 with Stock WM 6.1 ROM

Blog: http://www.sumitbhardwaj.co.in/blog
Krazy_About_Technology is offline  
Old 30-11-2008, 02:05 AM   #7 (permalink)
Broken In
 
Join Date: Apr 2005
Posts: 133
Default Re: Functions like gotoxy,delay,textcolor in c++ working in turbo C++ but not in dev

man what r u ppl talking about, its simply that conio.h doesn't exist in Dev C++. If u want conio.h, you can get it from www.sourceforge.net but u have to search for it and you will be able o find these functions.
__________________
Abhishek Bhattacharya
abhishek_del is offline  
Old 30-11-2008, 10:07 AM   #8 (permalink)
Alpha Geek
 
Krazy_About_Technology's Avatar
 
Join Date: Jun 2004
Location: Noida - India
Posts: 765
Default Re: Functions like gotoxy,delay,textcolor in c++ working in turbo C++ but not in dev

What we are talking about is the difference between programming for a 16bit and a 32 bit environment. Many student grow up believing Turbo C++ is what is called C++, they dont exactly understand that C++ is just a CORE language specification and every compiler adheres to it and also adds some compiler specific and/or platform specific functionality to the standard by means of providing extra keywords, headers and libraries. I tried to explain that.

What you are saying is also correct. There are quiet a few implementations of conio.h available on net but using them is not same as copying the file from turbo c++'s directory. They are vastly different from the "original" conio library and are fully 32 bit code. If you look at my post, i had said to search for something like that on MSDN, coz i found one long time back. Sourceforge is another place for that. But its almost the same thing.
Moreover, i dont think there is any library present that mimics the functionality of BGI (graphics.h etc) on 32bit compilers. And even if there is one, that would also be doing it using Direct X or Open GL in the background. So story is more or less same buddy.

The difference is that you touched the surface, and i got in deep
__________________
Dell Inspiron 1525 - C2D 2 Ghz, 3GB, 250GB, X3100 :)

Samsung Omnia Pro B7610 with Stock WM 6.1 ROM

Blog: http://www.sumitbhardwaj.co.in/blog
Krazy_About_Technology is offline  
Old 22-12-2008, 09:14 PM   #9 (permalink)
Broken In
 
Join Date: Apr 2005
Posts: 133
Default Re: Functions like gotoxy,delay,textcolor in c++ working in turbo C++ but not in dev

I know that it is the case of 16 bit and 32 bit systems and Turbo C++ is an old compiler.
32 bit operating systems have different implementations.
__________________
Abhishek Bhattacharya
abhishek_del is offline  
Old 03-01-2009, 06:59 PM   #10 (permalink)
learnhardy
 
Join Date: Oct 2008
Posts: 104
Default Re: Functions like gotoxy,delay,textcolor in c++ working in turbo C++ but not in dev

Why someone not create a sticky thread .......for this issue......"difference between compilers".....
it will be great help!! or there any already??please assign me !! Most of the guys facing these problems(shows in thread)?
__________________
Newbie......
celebrate an ancient art .....
http://ambika.99k.org
ambika is offline  
Old 09-01-2009, 12:36 PM   #11 (permalink)
Right Off the Assembly Line
 
Join Date: Jan 2009
Posts: 8
Thumbs up Re: Functions like gotoxy,delay,textcolor in c++ working in turbo C++ but not in dev

I think Krazy is right. The C/C++ we use is not the actual C/C++ that were developed. The original C/C++ was not actually meant for graphics and all such small functions we do, the actual C was only meant for system programming and AI language. The whole UNIX o/s is built on C, so you can get the main strength of C. So many functions you get in C are actually provided by third parties. So some functions may not work in some compilers and some may work.






____________________________
Erase data
sankha is offline  
Old 14-01-2009, 12:34 PM   #12 (permalink)
Err.. what?
 
BSOD's Avatar
 
Join Date: Apr 2008
Posts: 65
Default Re: Functions like gotoxy,delay,textcolor in c++ working in turbo C++ but not in dev

In case you really want conio.h with the gotoxy() and the works because you school does not stop *****ing about it, you can get it here.
But, if you are on your own I guess you will be better of learning something like ncurses or any good GUI library. No one uses conio.h to make interfaces.

As a matter of fact, conio.h does exist in Dev C++ except, it does not have all the Turbo C++ extras. Anyway, I guess the root of the problem is the textbooks that schools prescribe. They seem to teach students all the older stuff using ancient compilers that no longer are used. Instead of teaching something interesting and fun or useful. Allegro for the former and STL for the latter are some examples. But, I guess I have no way to change the education system and people who are really interested will learn it own their own. My 0.02 paisa.

Last edited by BSOD; 14-01-2009 at 12:38 PM. Reason: Automerged Doublepost
BSOD is offline  
Old 14-01-2009, 11:50 PM   #13 (permalink)
The Smaller Bang
 
MetalheadGautham's Avatar
 
Join Date: Sep 2007
Location: Gautham City
Posts: 7,492
Default Re: Functions like gotoxy,delay,textcolor in c++ working in turbo C++ but not in dev

^^The reason behind it is pretty simple actually.

All these boards always use questions from previous years' papers. They hate making completely new questions every year the way IIT-JEE guys do.

Obviously you too know that anyone can score 75% atleast by knowing answers to previous 15 years papers.

And in Computers, perhaps these guys think changing syntax and functions completely is very hard.
__________________
http://TheSmallerBang.wordpress.com
eMachines E725 - T4400 2.2GHz, 1GB, 160GB
Nokia 5130XM * T-Sonic 610 2GB
Nokia 2323C * Samsung Galaxy Y
Apple iPad 2 16GB WiFi
MetalheadGautham is online now  
Closed Thread

Bookmarks

Thread Tools
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Use 1 button for 2 functions Chetan1991 QnA (read only) 3 01-09-2007 04:20 PM
About C functions clrscr, delay. Cannot be found? aditya.shevade QnA (read only) 6 25-01-2007 09:45 PM
making a s/w that functions like a search engine deepak.krishnan QnA (read only) 1 06-12-2006 02:18 PM
PS 3 Delay abracadabra Technology News 3 20-03-2006 05:41 PM
What are the functions of all these 4 AVG services? Vishal Gupta QnA (read only) 4 09-10-2005 11:26 PM

 
Latest Threads
- by gforz
- by soumya
- by Sujeet
- by icebags
- by Charan

Advertisement




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


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

Search Engine Optimization by vBSEO 3.3.2