Reputation: 187
I am trying to declare a byte which I did in Visual C++ as this:
static CONST BYTE NEW_REGISTRATION = 0x30;
but in Objective C I have done as thus:
const char NEW_REGISTRATION = 0x30;
NSLog(@"output here = %C", NEW_REGISTRATION);
and my output seems to be just simply
output here = 0
Upvotes: 0
Views: 918
Reputation: 620
Ascii 0x30
represents 0
character. Try with something else e.g. 0x35
. See table: http://www.asciitable.com/
Upvotes: 2