这是函数的一部分。文本是一个指针传递到函数。gfxxxCHAR * GETLIGAGEXETCIN PTR(const gfxxxCHAR *(*text))i,并在这里得到一个例外:如果(文本)!{NULL){返回(GFXXXCHAR *)文本[语言];} {{返回(GFXXXCHAR *)“”;//没有字符串?现在指针明显坏了。但是如何呢?它不是空的。需要一定范围内好吗?编译器有测试功能吗?我宁可排空格,也不例外。
以上来自于百度翻译
以下为原文
This is part of a func
tion. text is a pointer passes in to the function.
GFX_XCHAR *getLanguageStringPtr(const GFX_XCHAR *(*text))
I and getting an exception here:
if(text != NULL)
{
return (GFX_XCHAR *)text[language];
}
else
{
return (GFX_XCHAR *)""; // No string?
}
Now the pointer is obviously Bad. But how? It is Not Null. does it need to be withing a certain range to be good?
doe the Compiler have a test function? I would rather have to line blank then an exception.