Home Forums C Programming easy one

Viewing 1 reply thread
  • Author
    Posts
    • #1992
      S.Thananchayan
      Participant
      DWORD i;
      for (i=0; i if("%i ", (unsigned char)buf){
      printf ("%i ", (unsigned char)buf);
      printf ("- this value was sent to the serial port           and returned through the loopback.");
      }
      else{
      printf("Bad or No LoopBack");
      // okay I put the loop back on and it prints fine - take the loopback out and else doesnt print this is simple isnt it. What am I doing wrong?
      }

    • #3245
      S.Thananchayan
      Participant

      //I finally got it werking…
       

      DWORD i;
      for (i=0; i<read; i++)
      if("%i ", (unsigned char)buf){
      printf ("%i ", (unsigned char)buf);
      std::cout << "- This value was sent to the serial n "
             << "     port and returned thru loopback." << std::endl ;
      }
      else;
      if(!read )
      std::cout << "No loopback installed.";
Viewing 1 reply thread
  • The forum ‘C Programming’ is closed to new topics and replies.