Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
typedef 字符 * pChar
typedef const char * pConstChar
我发现
const pChar 是char * const
pConstChar 是const char *
我对吗?
是的,这是正确的。在类型的正确一侧写入时更明显const,即始终将其放在右侧:
const
const pChar
等同于
pChar const
这与
char* const