 |
26-11-2008, 10:20 PM
|
#1 (permalink)
|
|
Right Off the Assembly Line
Join Date: Oct 2008
Posts: 7
|
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.
|
|
|
|
Advertisements. Register and be a member of the community to get rid of them.
|
|
Advertisement
|
|
26-11-2008, 10:35 PM
|
#2 (permalink)
|
|
Wahahaha~!
Join Date: Dec 2006
Location: Pune/there
Posts: 7,676
|
Re: Functions like gotoxy,delay,textcolor in c++ working in turbo C++ but not in dev
Because Turbo C hates us
|
|
|
27-11-2008, 01:01 AM
|
#3 (permalink)
|
|
Commander in Chief
Join Date: Jul 2005
Posts: 6,658
|
Re: Functions like gotoxy,delay,textcolor in c++ working in turbo C++ but not in dev
Quote:
Originally Posted by aashish473
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
|
|
|
27-11-2008, 01:56 AM
|
#4 (permalink)
|
|
Alpha Geek
Join Date: Jun 2004
Location: Noida - India
Posts: 765
|
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
|
|
|
27-11-2008, 06:11 PM
|
#5 (permalink)
|
|
Commander in Chief
Join Date: Jul 2005
Posts: 6,658
|
Re: Functions like gotoxy,delay,textcolor in c++ working in turbo C++ but not in dev
Quote:
Originally Posted by Krazy_About_Technology
^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
|
|
|
28-11-2008, 01:29 AM
|
#6 (permalink)
|
|
Alpha Geek
Join Date: Jun 2004
Location: Noida - India
Posts: 765
|
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
|
|
|
30-11-2008, 02:05 AM
|
#7 (permalink)
|
|
Broken In
Join Date: Apr 2005
Posts: 133
|
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
|
|
|
30-11-2008, 10:07 AM
|
#8 (permalink)
|
|
Alpha Geek
Join Date: Jun 2004
Location: Noida - India
Posts: 765
|
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
|
|
|
22-12-2008, 09:14 PM
|
#9 (permalink)
|
|
Broken In
Join Date: Apr 2005
Posts: 133
|
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
|
|
|
03-01-2009, 06:59 PM
|
#10 (permalink)
|
|
learnhardy
Join Date: Oct 2008
Posts: 104
|
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
|
|
|
09-01-2009, 12:36 PM
|
#11 (permalink)
|
|
Right Off the Assembly Line
Join Date: Jan 2009
Posts: 8
|
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
|
|
|
14-01-2009, 12:34 PM
|
#12 (permalink)
|
|
Err.. what?
Join Date: Apr 2008
Posts: 65
|
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
|
|
|
14-01-2009, 11:50 PM
|
#13 (permalink)
|
|
The Smaller Bang
Join Date: Sep 2007
Location: Gautham City
Posts: 7,492
|
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
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|