0

picture of my code This is my code. It is compiling and executing but not producing any images

3
  • and that is (buffer[3]==0xe0 || buffer[3]==0xe1) Jul 15, 2016 at 9:45
  • In the future, please cut and paste code into the question. When code is in an image, it is difficult to read and impossible to copy it out to an IDE to test.
    – Cliff B
    Jul 15, 2016 at 18:12
  • Ok from the next time. Jul 18, 2016 at 13:17

1 Answer 1

0

As say Cliff B, without checking the code we can give a wrong answer, so at first glance, it seems that the following fragment seems wrong:

 buffer[1] == 0xd2

It should be

 buffer[1] == 0xd8
1
  • I solved my problem , I used the debugger and saw that my if(buffer[0]==0xff && buffer[1]==0xd2 .....) was not executing therefore i created an array as sampe[5]= {0xff, 0xd2,0xff,0xe0,0xe1} and then made the comparison like if (buffer[0]==sample[0] && buffer[1]==sample[1] and it worked.But i am still trying to figure out what was wrong with the previous if code. Jul 18, 2016 at 13:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .