To write multiple characters in a single quote

Asked 2 years ago, Updated 2 years ago, 26 views

The chords at the bottom 1952805748 I printed it out. Why?

Is it the address or something?

cout << 'test'; // Note the single quotes.

c++ quote

2022-09-21 18:58

1 Answers

Multi-character literal. 1952805748 is expressed in hexadecimal, which is 0x74657374 If you take a look at this in 2 digits at a time

0x74 -> 't'
0x65 -> 'e'
0x73 -> 's'
0x74 -> 't'

It's going to be.


2022-09-21 18:58

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.