Thursday, July 30, 2009

C++ program usin \\?

im writing a c game and trying to use ascii to draw a picture but i am unable to use backslashes. i tried using puts() and printf() but it doesnt allow it as an unknown escape sequence. anyone know how i could solve this

C++ program usin \\?
Use \\. \ is an escape sequence character in C and C++. What that means is, there are certain unprintable characters used by computers, such as tab, new line, carriage return and null character. To represent these values in code, we precede them with \ and type a known escape sequence. So tab is \t, new line is \n, carriage return is \r. If you want to write a \, you use two backslashes \\.


No comments:

Post a Comment