我正在使用Visual C++编译我的Cinema 4D插件。为什么我的部分代码没有执行?
GeDebugOut("-->");
subroot = NULL;
head = NULL;
tail = NULL;
success = PolygonizeHierarchy(source, hh, head, tail, &subroot, malloc);
if (!success) {
/* .. */
}
String str("not set.");
if (subroot) {
GeDebugOut("yes");
str = "yes!";
GeDebugOut("Subroot name: " + subroot->GetName());
}
else {
GeDebugOut("no");
str = "no!";
}
GeDebugOut("Is there a subroot? " + str);
GeDebugOut("<--");
预期输出如下:
-->
yes
Subroot name: Cube
Is there a subroot? yes
<--
(或 “无”,而不是相同的),但我得到
-->
yes
<--
为什么两个印记丢失这里?
这是GeDebugOut
声明。
void GeDebugOut(const CHAR* s, ...);
void GeDebugOut(const String& s);
String
类可以连接。它超载了+
运算符。
String(void);
String(const String& cs);
String(const UWORD* s);
String(const CHAR* cstr, STRINGENCODING type = STRINGENCODING_XBIT);
String(LONG count, UWORD fillch);
friend const String operator +(const String& Str1, const String& Str2);
const String& operator +=(const String& Str);
如何声明'GeDebugOut'? – jxh 2012-07-25 15:41:36
@ user315052看我的编辑,请见。 – 2012-07-25 15:45:36
是'字符串'的'std :: string' typedef? – jxh 2012-07-25 15:46:54