put elements in an array- C-cooja -


i want put each message received in array , print out array after received message of time : received message hello node 1 , want put message in array- array[1], , receive message letsgo node 2 , put message in array - array[2] , after couble of time 3 or 4 times want print out array element : hello,letsgo, ... how can ..

i appreciat hard work me guys , in advance ..

this code :

 int o =0;  char sendtoo[3]={};  recv_uc(struct unicast_conn *c, const rimeaddr_t *from)    {           { i++ ;             if ( table[i] == from->u8[0] );            b=table[from->u8[0]]++ ;  printf(" message received %d.%d  , & = %d = %s\n ", from->u8[0], from->u8[1], b,(char *)packetbuf_dataptr());     } while (i<1);      if ( sendtoo[o] == from->u8[0] );     sendtoo[o] = packetbuf_copyto (sendtoo) ;    o++ ;     printf("%d,",sendtoo); } 


Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -