Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
I have begun using nCurses and am using getstr(name) to enter charaters and it is working well. However I would like to enter multi-digit numbers and tried this:
This only enables me to enter one character. I want to enter '22' but it only lets me enter '2'. All of the books and online resources say getch() will only grab one character.I have searched all the resources but they don't have the example I'm looking for to handle multi-digit input for one data variable. So as my last resort I am submitting my question here.
Can someone help me out and explain a way that I can enter multi-digit variables with getch() or some other nCurses function?