\a
is the bell/alert character, which on some systems triggers a sound. \nnn
, represents an arbitrary ASCII character in octal base. However, \0
is special in that it represents the null character no matter what.
To answer your original question, you could escape your '0' characters as well, as:
std::string ("\060\000\060", 3);
(since an ASCII '0' is 60 in octal)
The MSDN documentation has a pretty detailed article on this, as well cppreference