What does \x mean in C/C++?

前端 未结 7 1161
一生所求
一生所求 2020-12-08 09:46

Example:

char arr[] = \"\\xeb\\x2a\";

BTW, are the following the same?

\"\\xeb\\x2a\" vs. \'\\xeb\\x2a\'<

7条回答
  •  南方客
    南方客 (楼主)
    2020-12-08 10:21

    It's a special character that indicates the string is actually a hexadecimal number.

    http://www.austincc.edu/rickster/COSC1320/handouts/escchar.htm

提交回复
热议问题