Q:

In c++ what does this mean: for string n and int l n[l]=-1;

Here is the whole code:
    string n,w;
    char max='0';
    int l=0,p,i,k,j;

    cin>>n>>k;

    p=n.length();
    for (i=0;i<p-k;i++){
        max='0';
        for (j=l;j<p-(p-k)+1+i;j++){
             if (n[j]>max) {
                  l=j;
                  max=n[j];
                }
          }

        n[l]=-1;
        w[i]=max;
        cout<<w[i];
    }

I tried to rewrite the code in java but couldn't figure out what that n[l]=-1 means.
And please don't mind the other aspects of this code.

A:

It's more than likely setting the byte to 0xFF (which is equal to -1 as a signed byte).

