the character 'N' has the value of 78
so would i define it as:
#define N '78'
so i can use it in this example:
if (arr[i][j] == N ) {
statement;
}
thanks
Printable View
the character 'N' has the value of 78
so would i define it as:
#define N '78'
so i can use it in this example:
if (arr[i][j] == N ) {
statement;
}
thanks
no
'78' is not a character
if you want to declare a character with ascii value of 78
just use 78
eg.,
char c=78;
thanks alot.. this is the help i was looking for.. now my program working and is successfully on its way.. thanks
But since you can say
if ( arr[i][j] == 'N' ) {
You don't need to define anything, and you don't need to know the ascii value for N, and you don't even care if your character set isn't ascii.
You are right , I was wrong , ascii has nothing to do with it , I meant the numerical value of the character .