Hi Guys,
I am trying to compile a code which has the following code as part of it. Once I compile the code I got the following error message:
warning:comparison between pointer and integer
and the error lines are located on the word with red colour.
Code:
int payload[] ={ (random_rand() % 45)};
if ((int*) payload < 20)
{ pr = 00; }
else if ((int*) payload >= 20 && (int*) payload <=25)
{ pr = 01;}
else if ((int*) payload > 25 && (int*) payload <=35)
{ pr = 10;}
else { pr = 11}
Is the way I compare the an integer array with an integer number correct? is there a better way to make a comparison?
Thanks.
Sul