문제

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