I think you should use if (aRecord->Ground=='u') . . . simples quots.
----- Original Message -----
From: "Del Ventruella" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[email protected]>
Sent: Tuesday, November 01, 2005 5:35 PM
Subject: I hate to ask
This is basic C++. I could substitute an integer, but would like to
understand how to make this work in the manner in which I originally
intended. If anyone has a spare moment, please respond.
Essentially, I have a structure that includes a char (char[1]). I assign
it a value based upon the state of some device. In this case, "s" or "u".
I would like to then use this in a boolean expression, such as:
if (aRecord->Ground=="u")
{
FrmSetControlValue(frmP, FrmGetObjectIndex(frmP, UnGnd),1);
}
Unfortunately, "aRecord->Ground=="u", always returns "false", even when I
set its value equal to "u". I seem to be dealing with some issue of
accessing the zeroth character in the string within the structure, but I
could be misinterpreting this. I'm simply not sure how to do this. The
char was declared as: Ground[1].
Thanks. I do have this working when I receclare Ground to be an integer
and simply assign a number. Unfortunately, it is more difficult to
associate any meaning with the number than it is with the character.
Thanks.
--
For information on using the PalmSource Developer Forums, or to
unsubscribe, please see http://www.palmos.com/dev/support/forums/
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/