How to implement it using pure c.. no C++?
thanks in advance.
How to implement it using pure c.. no C++?
thanks in advance.
You need to use whatever your environment provides you. If you're in a console of some kind, you probably want a library such as ncurses. If you're doing Windows programming, they probably have something similar. Anyway, it's entirely dependent on your environment / compiler, and not something that's standard in C.
Quzah.
Hope is the first step on the road to disappointment.
am on linux. I want it to have in its simplest way!
type 'man termios' at the command prompt, and read about ECHO.
There is an example use of termios in one of the FAQs.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
thanks salem but I am unable to understand how it is working?
A pointer to explanation of the code(how and why it is working to make myself comfortable with such techniques) will also be highly appreciated.
There's an example in the FAQ.
If you get bored of manual searching, try "termios" in the search field.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
yeah, I did that only!
what is this line of code doing?
newt.c_lflag &= ~( ICANON | ECHO );
Have a guess...
Or read what &, ~ and | do.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.