If I have an array:
char array[] = "hello";
Now 'array' is the address to the first element. You can access elements in the array by going:
&array[0]+i
where "i" is some index value.
My question is, lets say I want to make the array "hello" become "lo" for example. How do I change the address of where 'array' currently points? I've tried several things. I would guess it would be something like this but this does not work:
array = &array[0]+i
Any thoughts?
-bitwise
char array[] = "hello";
Now 'array' is the address to the first element. You can access elements in the array by going:
&array[0]+i
where "i" is some index value.
My question is, lets say I want to make the array "hello" become "lo" for example. How do I change the address of where 'array' currently points? I've tried several things. I would guess it would be something like this but this does not work:
array = &array[0]+i
Any thoughts?
-bitwise