Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Meet and Greet (http://www.go4expert.com/community/meet-and-greet/)
-   -   null assignment error (http://www.go4expert.com/community/null-assignment-error-t9795/)

qwert 6Apr2008 12:05

null assignment error
 
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

SpOonWiZaRd 25Apr2008 16:05

Re: null assignment error
 
Ask a programmer in the programming section...


All times are GMT +5.5. The time now is 03:43.