Sunday, May 30, 2010

moving pointers around

if(*(*(args->arg_array+i)+1) == '\0'){
args->rdfilename[0] = (args->arg_array[i+1]); // point to the filename
}
// if the next character is a character make that character the start of the filename
else{
args->rdfilename[0] = (*(args->arg_array+i)+1);// point to the filename
//not args->rdfilename[0] = *(*(args->arg_array+i)+1);

// **(args->arg_array+i) = '\0'; // remove the < // I deleted the < but the pointer is still pointing to its slot

No comments:

Post a Comment