@keskiverto
1 2 3 4 5 6
|
char * pdigit = find_digit(cstr);
while( pdigit )
{ cstr = pdigit;
move_left(cstr);
pdigit = find_digit(cstr);
}
|
and can you explain to me what the point of using pointer pdigit here?
and also is there algorithm behind this program..? like how to think to produce code like that... or just using logic and implement it in c sntax? ..?
and thankyou for explaining in really easy to understand way!!!!!!!!!!!!!!!!!!
in conclusion if the while dont have assignment "while(find_digit(cstr)", the return copy from find_digit is just to determine the condition of the while loop as long as not NULL , but the pointer that pass to the move_left function is the one that delete_digit has and it doesnt have any relation with the return copy pointer from find_digit
but the move_left will result in change of the array so i see changes in delete_digit
but if i use "while(cstr=find_digit(cstr)" the return pointer from find_digit will be insert to cstr(local variable) again so it will change the pointer in delete digit!!!!
and the move_left will result in change of the array so i see changes in delete_digit
THANKYOU to everyone that help me to understand,, know its clearer,, and also this pretty sum up what i have been learned so far right now!!! またよろしくお願いいたします。!!!