[En-Nut-Discussion] Receiving data problem

MUHAMMAD AZEEM AZAM muhammadazeemazam786 at yahoo.com
Mon Jan 22 10:44:54 CET 2007


i am unable to sent 2d ARRAY TO MY CLIENT ON PC.
  the code is below.
  I have to use tcp sockets.
  i need to send "char var[1024][128]" this array. 
  "char var[4][128]" this thing is working but after that my client application hangs.
   
  if (strncmp(buff, "2darray", got_data) == 0) //If Match 
 {
  int a = 5;
  int b = 128;
  char mvar[a][b];
  char mvarr[128];
  
  int i,j;
  
  for(i=0;i<a;i++)
  {
   for(j=0;j<b;j++)
   {
    mvar[i][j] = rand()%26+'a';
   }
  }
  for(i=0;i<a;i++)
  {
   for(j=0;j<b;j++)
   {
    mvarr[j] = mvar[i][j];
   }
  fwrite(mvarr,sizeof(mvarr),1,stream);
  }  
 continue;
 }

 
---------------------------------
Expecting? Get great news right away with email Auto-Check.
Try the Yahoo! Mail Beta.


More information about the En-Nut-Discussion mailing list