Exactly what do you want to do?
StrCat wants two strings, a sequence of 0 or more characters terminated
by a NULL. This sequence of characters is referred to by a pointer to
the first character in the sequence.
P[i] is a single character and &P[i] is effectively a reference to the
string starting i characters into the array P, right?
I think using "(void)StrNCat(str, &P[i], 1)" instead of StrCat will
accomplish the immediate goal of what you want to do, but you might want
to think about your approach to the bigger problem.
alan
---Original Message---
From: "Palm Developer Forum" <[EMAIL PROTECTED]>
To: Palm Developer Forum <[EMAIL PROTECTED]>
Date: Thu, 19 Dec 2002 13:20:23 -0800 (PST)
Subject: Re: StrCat help
The problem is being that StrCat(str, P[i]) doesn't
compile and StrCat(str, &P[i]) gives me the whole
string P instead of just one char.
Char * P = TblGetItemPtr(table, row, column);
for (i = 0; i < len; i++) {
if (P[i] == '~')
...
else
StrCat(str, &P[i]);
Hope some of you can help me out here.
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/