Lưu ý
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử đăng nhập hoặc thay đổi thư mục.
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử thay đổi thư mục.
Use the following tips:
Working with a bytewise index into a string presents problems similar to those posed by pointer manipulation. Consider this example, which scans a string for a backslash character:
while ( rgch[ i ] != '\\' ) i++;This might index a trail byte, not a lead byte, and thus it might not point to a
character.Use the _mbclen function to solve the preceding problem:
while ( rgch[ i ] != '\\' ) i += _mbclen ( rgch + i );This correctly indexes to a lead byte, hence to a
character. The_mbclenfunction determines the size of a character (1 or 2 bytes).