[SOLVED] pointer to pointers
by errigour from LinuxQuestions.org on (#6QHRG)
I can't seem to get this to work the way I want it. I want word to increment what its pointing to in func2 after func is called and i want to increment what **word2 is pointing to. so **word2 will change to the next character of word. I thought i was doing it right here but my program doesn't run right. Is it even possible to increment what word is pointing to?
And how do I increment what part of word word2 is pointing to?
Code:void func(unsigned char **word2) {
(*word2)++;
*word2++;
}
void func2(unsigned char *word) {
func(&word);
}
And how do I increment what part of word word2 is pointing to?
Code:void func(unsigned char **word2) {
(*word2)++;
*word2++;
}
void func2(unsigned char *word) {
func(&word);
}