C ++ ""

xiaoxiao2021-03-06  42

As we all know, C uses "/" to escape, the following is his common escape form

Side sequence: Description

/ N wrapper

/ T horizontal tab

/ r Enter

/ a warning sound

// /

/ ""

/ ''

But when using characters, pay attention to:

CHAR A = ''; // a space

CHAR B = ''; // Two spaces

The above A and B are the same, all spaces, but

CHAR C = '/ n'; // / n has a space

CHAR D = '/ n'; //// has a space

Char E = '/ n'; // No space

The above C and D are spaces, only E is a newline.

Be careful when using it.

(The above code runs on VC7)

转载请注明原文地址:https://www.9cbs.com/read-59505.html

New Post(0)