What is the use of clrscr and getch | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What is the use of clrscr and getch

13th Jun 2017, 5:17 AM
HeniX
HeniX - avatar
8 Answers
+ 6
and conio.h is older than the dinosaurs and not recommended at all
13th Jun 2017, 6:53 AM
jay
jay - avatar
+ 4
sounds like someone is using conio.h cin is standard c++ for getting input from the console. Use it.
13th Jun 2017, 6:21 AM
jay
jay - avatar
+ 2
clrscr()- to clear the output screen and getch()- for getting an input from user.
13th Jun 2017, 5:34 AM
Ayush
Ayush - avatar
+ 1
Thanks
13th Jun 2017, 5:38 AM
HeniX
HeniX - avatar
+ 1
it's up to you which one you use..
13th Jun 2017, 5:48 AM
Ayush
Ayush - avatar
+ 1
ohh so getchar is only applicable in conio.h
13th Jun 2017, 6:39 AM
HeniX
HeniX - avatar
+ 1
OK Got it thanks for helping
13th Jun 2017, 7:03 AM
HeniX
HeniX - avatar
0
If getch fetch input from the user then what is the use of cin?
13th Jun 2017, 5:39 AM
HeniX
HeniX - avatar