在多個字符中使用單引號在C ++中有什麼作用? - What do single quotes do in C++ when used on multiple characters?

問題:

I'm curious about this code: 我對此代碼感到好奇:

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

gives me an output of 1952805748 . 給我一個1952805748的輸出。

My question: Is the output an address in memory or something? 我的問題:輸出是內存中的地址還是其他?


解決方案:

參考一: https://stackoom.com/question/VIfb
參考二: What do single quotes do in C++ when used on multiple characters?
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章