0
What does '\xB2' this mean in c++ ??
Actually, I'm encounter this in someone's project
12 Answers
+ 3
\x will render character that represent its hexadecimal form.
for example A has 65 as the character code, and 65 in hexadecimal is 41. so you can use \x41 as A.
in this case \xB2 is ²
+ 2
each character has its own numeric code/form for computer to be able understand it.
we can use this numeric code to represent certain character that we probably cant type by our own, such as ² (exponent 2/superscript 2)
+ 1
Taste Will you further elaborate it
+ 1
Taste but what xb2 is doing in that case
+ 1
if you print \xB2 it'll render ² in the output
+ 1
And what if I want to preempt the user to press ENTER key for further process if he/she press ENTER Key then he/she will be able to continue. what will be the code to do this??
+ 1
you can use cin.get()
if i remember correctly
+ 1
Hope you will be right đ
+ 1
Taste But what if I want to check whether user press ENTER Key or not
+ 1
sorry i dobt know that one, try to ask new question. maybe someone else can help
+ 1
Okay