LANS
unread,Dec 6, 2008, 12:02:14 PM12/6/08Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Xsera Development
So, I've started adding code to check if messageID contains A-Z, a-z,
0-9, and _, and dump the message if it doesn't contain only those.
I've tried to test what I wrote using this in a separate, standalone
program, but I keep getting an error:
"ISO C++ forbids comparison between pointer and integer"
Any help would be appreciated.
int main () {
int messageIDLength = 63;
char messageID[63] = {'0', '1', '2', '3', '4', '5', '6', '7', '8',
'9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',
'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a',
'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'};
int i;
bool goodMessage = true;
for(i = 0; i <= messageIDLength; i++)
{//......................
0........9....||...................A........Z....||...................a.........z....||................
_
if( (messageID[i] >= 48 && messageID[i]<= 57) || (messageID[i] >=
65 && messageID[i] <= 90) || (messageID[i] >= 97 && messageID[i] <=
122) || (messageID == 95) )
{
}
else
{
goodMessage = false;
break;
}
}
}