1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

null assignment error

Discussion in 'Meet and Greet' started by qwert, Apr 6, 2008.

  1. qwert

    qwert New 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 a moderator: Apr 7, 2008
  2. SpOonWiZaRd

    SpOonWiZaRd Know what you can do.

    Ask a programmer in the programming section...
     

Share This Page