1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

null assignment error

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

  1. qwert

    qwert New Member

    Joined:
    Apr 6, 2008
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    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.

    Joined:
    May 30, 2007
    Messages:
    747
    Likes Received:
    8
    Trophy Points:
    0
    Occupation:
    Network Engineer/Programmer
    Location:
    South Africa
    Ask a programmer in the programming section...
     

Share This Page