Unlimited character names have some restrictions on their use. In C99 and C ++ 98, you were not allowed to use the one that referenced the character in the base character set (which includes U + 002D).
C ++ 11 updated this requirement, so if you are inside a string or character literal, you are allowed to use a UCN that refers to the main characters. Depending on the version of the compiler you are using, I would suggest that you can use Objective-C ++ 11 to make your code legal.
However, since this character is part of ASCII and the basic character set, why don't you just write it literally?
@"-"
source share