null assignment error

qwert's Avatar, Join Date: Apr 2008
Newbie Member
hi
i had been trying hard 2 do sjf scheduling using structures.but i keep on getting null assignment error .this is a snippet of the code which i feel 2 be culprit
Code:
   for(i=0;i<n;i++)//n -no of process
  {
   scanf("%s%d%d",pr[i].p,pr[i].at,pr[i].bt);//process name is int,arrival int,bursttime int
  }
  for(i=0;i<=n;i++)
  {
     index=pr[i].bt;//index,tm1 are int 
     tm1=pr[i].p;
     j=i;
     while((j>0)&&((pr[j-1].bt)>index))
     {
       pr[j]=pr[j-1];
      // pr[j].p=pr[j-1].p;
       j=j-1;
     }pr[j].p=tm1;
     pr[j].bt=index;
  }
can someone help me with this error

Last edited by shabbir; 7Apr2008 at 11:58.. Reason: Code block
SpOonWiZaRd's Avatar, Join Date: May 2007
Know what you can do.
Ask a programmer in the programming section...