Why does Visual Studio add a slash at the start of an int, when it’s converted to char?
When I convert int 0 to char, it changes to \0. Why? I need char 0.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
\0is just how Visual Studio shows the characternullin debug windows.The
\is an escape sequence, so\0tells you this is thenullcharacter.If you want the character
0, you need to use the correct ASCII value for that character – 48.