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.
if(player!=NULL) player->shuffled();
我这样做是为了避免将空引用传递给字符串构造函数,但是在编译时仍然会出错。
在某个地方,不知何故,您正在调用值为 NULL的std::string构造函数。const char*
std::string
const char*
为了避免问题。不要那样做。