0

I am using Windows, Eclipse CDT and Mingw-w64. I want to call an alert ( aka bell aka beep) by using '\a' character literal.When I run this:

cout<<'\a'; 

computer doesn't produce any sound. I tried with endl, it didn't work. Sound on computer is on. I referred to this question, which technically asks the same thing, but it doesn't have any solution for Eclipse, it just tells that we need to try it in terminal, and tells that '\a' is not configured in Eclipse. My question is how can I force Eclipse to make the sound instead of printing square character?

P.S. I know there are other alternatives implementations for the beep sound, I want to use explicitly '\a'.

P.P.S In addition to alert literal, \b, \v, \f (backspace, vertical tab, formfeed) don't work as expected(maybe because output doesn't go to a printer), they print square chars and \r (carriage return) starts newline instead of going to the beginning of the current one.

Community
  • 1
  • 1
  • 1
    You've answered your own question: Because of how Eclipse is implemented. If you want to change this, change Eclipse's code. – deviantfan Oct 01 '16 at 18:05
  • No, (char)7 doesn't work. – his_dudeness Oct 01 '16 at 18:07
  • By telling they don't work as expected I mean \v in consolse doesn't make vertical spacing. But it is not an issue, because probably it is for printer usage. But in case of \a, we have other functioning beep alternatives, so \a should work as well. – his_dudeness Oct 01 '16 at 18:09
  • Can you help me with what should be done in Eclipse( ie change Eclipse's code)? Can it be done in settings or is it something low-level? – his_dudeness Oct 01 '16 at 18:10
  • For the second part of your question might want to look at [this SO question](http://stackoverflow.com/questions/21184548/formfeed-f-and-vertical-tab-v-not-working-in-c). –  Oct 01 '16 at 18:18
  • 1
    There is a lot of stuff left over from stoneage computing that doesn't receive much support on a modern system. Five bucks says Eclipse left this out because of the annoyance factor of implementing this across all of the platforms Eclipse supports was greater than the demand. – user4581301 Oct 01 '16 at 18:22
  • Thanks for the link, took my note. – his_dudeness Oct 01 '16 at 18:23
  • 2
    `Can you help me with what should be done in Eclipse( ie change Eclipse's code)? Can it be done in settings or is it something low-level?` It can't be done in the settings, and it's far more work than you think – deviantfan Oct 01 '16 at 18:29

0 Answers0