Utilizzo Visual C++ per compilare il plug-in per Cinema 4D.Perché parte del mio codice non è stata eseguita?
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("<--");
Il risultato atteso è la seguente:
-->
yes
Subroot name: Cube
Is there a subroot? yes
<--
(. O lo stesso con "no" invece) ma ho
-->
yes
<--
Perché sono due stampe mancanti Qui?
Questa è la dichiarazione di GeDebugOut
.
void GeDebugOut(const CHAR* s, ...);
void GeDebugOut(const String& s);
La classe String
è concatenabile. Sovraccarica l'operatore +
.
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);
Come viene dichiarato 'GeDebugOut'? – jxh
@ user315052 Vedi la mia modifica, pls. –
'String' è un typedef per' std :: string'? – jxh