我正在使用 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
<--
(或者用“no”代替。)但我明白了
-->
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);