Hi guys,
I've created an ASCII table. Whenever I compile it, the system gives a beep sound but still the console shows the table. I know something is wrong with the coding. But I don't know what. What should I do to avoid this?
Here is the coding. Please help. Thanks in advance.
In ASCII, characters below 32 are control codes with no graphical representation. One of them (I can't remember which one) causes the terminal to beep.
It's 7, that's what's traditionally used to signal a beep. Some of the values below 32 do have some form of graphical representation in some cases, however.
Hi helios,
Thanks indeed for your reply.
To be honest, I don't have prior programming experience. I'm learning C++ through online tutorial and some e-books. Would you please be quite explicit? Will this crash the system? I'm new so I want to know is that worrying if system beeps when compiling a coding?
Typing a letter and hitting alt+num8 works fine, but what I meant was that you can't do this: cout << 'h' << '\b';
For me, this prints h and does not backspace it.
Remember that ASCII was originally used for sending data to line printers. "Backspace" means "move the carriage back one space". It doesn't have to delete the character. In fact, I wouldn't be surprised if some old terminals used the combination "a\b¨" to make ä.
@Intrexa: Which is why I said it doesn't backspace anything if you print it out. We were talking about printing characters, and I said that it doesn't backspace anything. I think this was a simple misunderstanding.