CCAssert(m_state == kPaddleStateGrabbed, L"Paddle - Unexpected state!");

this is cocos2d-x sample code (TouchesTest). what's mean 'L' in front of "Paddle - "?

有帮助吗?

解决方案

L"a string" simply declares the string as a Unicode string. The string is then not of type char* but a wchar_t.

This article covers Unicode strings in great detail.

其他提示

To be simple, it means the string is a type of wstring, which using wchat_t for each of its character, instead of using a normal char*. C++ treat Languages such as Chinese or Japanese Differently. For those Languages using more than one byte to represent a single character, it uses wchar_t (wide char).

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top