Turbo C/C++ and other junk compilers help, discussions and queries here

garfield_56

zzzzzzzzzz........
Re: getch() in c++

thnx....:cool:

u mean to say dat getch() is used to display d output for d user----if we don't use it, den although d program will run, but d output will not be displayed???did i get it right??




and ya...in d program u gave
Code:
#include <iostream.h>
#include <conio.h>

void main() {
char c;
c = getch(); // Gets and stores a user-input character
cout << c << endl;
cout << "Press any key to exit.";
getch(); // No variable, used to get into an input-event loop.
}


r we usin getch() to do wat cin>> does(i.e.--get d input 4m user)??
 

QwertyManiac

Commander in Chief
Re: getch() in c++

thnx....:cool:

u mean to say dat getch() is used to display d output for d user----if we don't use it, den although d program will run, but d output will not be displayed???did i get it right??

No! The output is displayed just fine, but too fast and since the program ends after showing last cout operation, Turbo C comes back on the screen. So it appears like no output is shown, while it is. Just that it happens very fast and you don't notice.

You can use cin to the same effect but the difference is that using getch() does not echo (show) the pressed character on the screen. If you use cin, you can see what you are giving as an input but with getch() you can't. This is advantageous in certain situations.
 

mrintech

Technomancer
Re: getch() in c++

Here something for you Mr. Garfield: *www.planet-source-code.com/vb/Tutorial/default.asp?lngWId=3
 

Faun

Wahahaha~!
Staff member
Re: getch() in c++

^^switch to some other good compiler. If it's compulsory due to college then bear with the agony and pain of coding in Turbo C++ :D
 

garfield_56

zzzzzzzzzz........
Re: getch() in c++

^^switch to some other good compiler. If it's compulsory due to college then bear with the agony and pain of coding in Turbo C++ :D



hey....i've just started learning c++....till now..i dint hav much problm wid turbo...
 

QwertyManiac

Commander in Chief
Re: getch() in c++

hey....i've just started learning c++....till now..i dint hav much problm wid turbo...
Yes but the compiler and the language you are using was what existed in late 1980s. That's even before Jurassic age at the rate technology develops. Modern compilers provide better binaries, useful error and warning messages and even allow for easy use of new elements of the programming languages - like namespaces in C++. Its always good to use something new.
 

redhat

Mad and Furious
Re: getch() in c++

Thats the problem! Our colleges use stuff that is way too outdated
Certain valid syntax's are just not accepted by TC, its too frustrating, a few days back i fought with my professor as to why were we so outdated, learning C++ on turbo C and then doing VB 6.0 instead of .net
 

garfield_56

zzzzzzzzzz........
Re: getch() in c++

Yes but the compiler and the language you are using was what existed in late 1980s. That's even before Jurassic age at the rate technology develops. Modern compilers provide better binaries, useful error and warning messages and even allow for easy use of new elements of the programming languages - like namespaces in C++. Its always good to use something new.



yo...Lemme put it dis way...m learnin c++ in my school (yeah--no college yet!!:p)..
and its Turbo there..But yes, as soon as I master it, I'll surely go in for other compilers, coz as u said ""Its always good to use something new"":cool::)
 

ajooba215

Journeyman
turbo c for xp 64 bit...

hey guys ..m unable to 'run turbo c' on ma 64 bit version of windows xp....got any solutions for it?
 

paroh

Padawan
Re: turbo c for xp 64 bit...

See my this post (VIDEO Tutorial is also uploaded) how to set the setting to make the turboc run
Code:
*www.thinkdigit.com/forum/showthread.php?t=103652&highlight=dosbox
 

sny

Right off the assembly line
Re: c for window 7.

on 64 bit rite? I tried, but couldn't get it done. And now I'm using Visual Studio 2010..
 

manaskumar

Have fun till death!!
Re: c for window 7.

Write your programs in any suitable editor and complie it with GCC.
I personally use ECLIPSE IDE and DEVC++.
 

Who

Guess Who's Back
Re: Turbo C in Windows 7

Here what you should do , step by step

1) Show the finger to your teacher.
2) Burn that filth called "Let Us C" or any other indian author book.
3) Refer to this tutorial for books & compiler to use
*www.thinkdigit.com/forum/developers/132924-c-c-beginners-guide-post-basic-questions-here.html
4) Use the gcc compiler for betterment of yourself & the firm which will hire you.

That should be easy to follow , talk about widespread illiteracy.
 
Top Bottom