Sometimes the ugly managed c++ grammar can cause us much pain.
For example, what is the correct way of defining a __wchar_t gc array?
Wrong answers:
__wchar_t charArr[] = {':', '\\'};
__wchar_t[] charArr = {':', '\\'};
__wchar_t __gc[] charArr = {':', '\\'};
__wchar_t __gc charArr[] = {':', '\\'};
__wchar_t __gc[] charArr[] = {':', '\\'};
JUST_LET_ME_DEFINE_A_DAMN __wchar_t __gc charArr[] = {':', '\\'};
Only this one is right:
__wchar_t charArr __gc[] = {':', '\\'};
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment