How do you reference a lccation in an array
i want to create an array of fill characters so I do this:
Code:
for (z=0; z<l_length; z=z+1) //639
{
for(i=0;i<addr2;i++) bufferarray[i]=fill;
bufferarray[addr2]=0;
{
printf("%s", bufferarray );
} //end for
} //end for
Now that I have my array, I want to go back and reference location bufferarray[14] and place data into this spot and then after the data is finished, fill the rest of the array with the same fill character.
xxxxxxxxxxxxsomedataxxxxxxxxxxxxx
where x is the fill character and somedata represents...some data. i want to be able to take in the next set of data, which contains another location in the array where data needs to be written to and have that data entered in the same manner.
Right now, all I seem able to do is enter the new data into another array of size l_length so instead of one great big array I get 100's of arrays.