How to print "\ a" in C ++ using a codeword?

I tried to print \a, but it shows nothing, so I looked for it and found out that he had to make a sound, but he wasn’t either.

I am using lite code in Windows 8.

  • How to print \a?
  • Where is that sound?

This is my code:

#include <iostream>
using namespace std;
int main()
{
    cout <<"\a";
    return 0;
}
+4
source share
1 answer

How to create a ringtone

If you want to print a character '\a'to create a ringtone, you are already doing it right.

( / , ), . , . ( Windows 7 Windows 8)

> ( )

, (, ). ( Wikipedia )


\a,

\a,

cout <<"\\a";

\ , \a ascii .

escape- \\ \, a.

"\a" const char 2 \a '\0'

"\\a" const char 3 \, 'a' '\0'

:
1. ++
2. Escape sequence ++

+14

All Articles