Can you change the text 'header' on the popup when using cin to get an input? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Can you change the text 'header' on the popup when using cin to get an input?

When getting a user's input using cin, is there a way to change what the text on the popup box says? like can I make the text say enter password instead of "looks like they require an input" or whatever the default is? is it just adding a cout above the cin or?

22nd Nov 2016, 3:04 AM
Matt James
Matt James - avatar
4 Answers
+ 2
what do you want actually, can you give me an example
22nd Nov 2016, 4:19 AM
Aditya kumar pandey
Aditya kumar pandey - avatar
+ 2
You can use system function from window.h header file. Remember one thing computer do compile your code in default manner unless a instructions is not given in code to change that default manner. You can change color of text like system("COLOR 6C"); color change to yellow. There are many other useful method to make effect on terminal.
22nd Nov 2016, 4:35 AM
Aditya kumar pandey
Aditya kumar pandey - avatar
+ 1
In Linux you can use control characters to get colored output (if terminal in which you are running your app supports colors - but these days it's common feature). With Google you can find plenty of examples.
22nd Nov 2016, 4:22 AM
Ondřej Doněk
Ondřej Doněk - avatar
0
like when you want a user to input something you use cin. but the popup has text set already to like "requires an input" or whatever. I was wondering if I could change the text in the popup to anything I wanted or is it set to default always.
22nd Nov 2016, 4:22 AM
Matt James
Matt James - avatar