+ 1
Can in C++ we take input from user without getting printed on screen
Like if a user press a key it get stored in memory but cannot be seen on screen
6 Respostas
+ 2
hmm well........
I thought you were asking for turbo c++
however
getch() can also be used in codeblocks, there is no such issue regarding that.
EDIT: you can use getch(); in codeblocks without including the library <conio.h>
+ 1
Rosy so is it not possible to hide the input that could be done in turbo using getch()
+ 1
well, turbo c++ is just obsolete now, but still...
you can not hide any input you get in turbo c++ in a normal way but you can simply use clrscr();
for example :
cout << "Enter a number : ";
cin >> n;
clrscr();
cout << "Enter another number : ";
clrscr();
...... and so on
EDIT:
if you just want to get a key then use:
char ch;
ch = getch();
this won't display the key on screen.
+ 1
Atikrant Negi {Gamma} yup, I know well about that in turbo. That's why I asked to know if there is a way for other platform like codeblocks or Linux