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.
以下 C/C++ 代码导致 XCode 4 (Clang LLVM) 出现未使用的实体问题。
void stringMethod(const char *string){ while(*string!=0){ *string++; //... } }
它在那一行:*string++; 所以似乎clang没有意识到指针地址增加了?我不明白,如何调整这段代码......有什么想法吗?
尽量去掉解引用操作符*,增加指针时不需要解引用。
*