0
If i dont use #include<conio.h> and use clrscr() and getch() will the program run. If not they why...?
18 Antworten
+ 15
Clrscr and getch are widely used in non user friendly compliers .
In many good compliers you don't have to use them.
+ 9
<conio.h> itself belongs to C, and the functions in it are mostly deprecated by newer compilers. Some compilers can still getch(), but not clrscr(). Just try not to touch anything included in the header.
+ 5
The clrscr and getch function are not compulsory. They were simply there to clear the screen each time during output and wait for the users confirmation before exit.
These features are now already there in new compilers, so there is absolutely no need for these functions...
For example, code::blocks kindly clears the screen before every run, displays the execution time taken by the program, and doesn't exit till the user presses a key...
+ 5
@Kinshuk: conio.h the header that will not die ;) next will be an influx of questions on turbo c++
+ 4
@Ramya: Which question do you refer to?
btw If you are using turbo c++, please upgrade to a newer one.
code::blocks -or-
visualstudio community edition
you will thank yourself later
+ 4
@Ramya Bali
Sorry, I got carried away.
You see, I don't want people to face the same problems I faced when I was starting this language...
Sorry if I was rude...
+ 3
Yes, the program will work perfectly fine without conio.h, getch or clrscr...
This is the 3rd post Im answering recently on conio.h...
What has happened to people?
https://www.sololearn.com/discuss/458531/?ref=app
https://www.sololearn.com/discuss/453557/?ref=app
+ 3
@Ramya Bali
I had posted another answer regarding your query. Did you see that?
+ 3
@Ramya Bali
Im so sorry... Please forgive me... 😞😢🙏
+ 3
It is a terrible situation though. People teaching 26-30 year old methods.. sorta needs to be addressed
+ 2
@kinshuk and @jay em jst starting to learn this language soo I have question which I ask as a beginner soo plss see that too
+ 2
thx @jay
+ 2
u were a lil @kinshuk vasisht but it's OK...☺
+ 1
yea I did @kinshuk
+ 1
conio.h
clrscr()
getch()
gotoxy()
stdlib.h
system("cls")
system("pause")
here_isnt()
0
Try it in the code playground an see by yourself.
0
@Kinshuk Vasisht
its OK...☺