Mailinglist Archive: opensuse-programming-de (140 mails)
| < Previous | Next > |
Konvertierung von unsigned char* auf signed char*
- From: Christian Weickhmann <bowfingermail@xxxxxxx>
- Date: Thu, 10 Oct 2002 13:53:30 +0200
- Message-id: <200210101353.30672.bowfingermail@xxxxxxx>
Hallo Leute!
Ich bin mir nicht ganz sicher, wie man am besten vorgeht, wenn
man aus einem unsigned char* ein char* machen möchte.
Folgendes Problem:
// --- 8< ------------------
// Alle Includes da.
typedef unsigned char xmlChar;
xmlChar* name;
char* n;
strcpy(n, name); // Führt zum Absturz mit SIGSEGV
// --- 8< ------------------
Meine Frage nun: Wie mache ich aus einem unsigned char (xmlChar)
ein char? Danke!
Viele Grüße,
Christian
--
"There was an interesting development in the CBS-Westmoreland trial:
both sides agreed that after the trial, Andy Rooney would be allowed to
talk to the jury for three minutes about little things that annoyed him
during the trial."
-- David Letterman
Ich bin mir nicht ganz sicher, wie man am besten vorgeht, wenn
man aus einem unsigned char* ein char* machen möchte.
Folgendes Problem:
// --- 8< ------------------
// Alle Includes da.
typedef unsigned char xmlChar;
xmlChar* name;
char* n;
strcpy(n, name); // Führt zum Absturz mit SIGSEGV
// --- 8< ------------------
Meine Frage nun: Wie mache ich aus einem unsigned char (xmlChar)
ein char? Danke!
Viele Grüße,
Christian
--
"There was an interesting development in the CBS-Westmoreland trial:
both sides agreed that after the trial, Andy Rooney would be allowed to
talk to the jury for three minutes about little things that annoyed him
during the trial."
-- David Letterman
| < Previous | Next > |