I'm trying to pass a pointer of pointer in order to modify its content in another function. In order to do this, I've read that I need to use a pointer of pointer of pointer so here's my "code" so far:
void modify(s8 ***strings){
// Modifies the strings
}
void main(){
s8 strings[9][95];
for(i = 0 ; i < 9 ; i++){
for(j = 0 ; i < 95 ; i++){
strings[i][j] = 0;
}
}
modify(&strings);
}
s8 is a special type that is used by the MicroBlaze I'm using, is this a problem? I've also read that I need to use const but I don't understand where and why?
What about the size? Will I need to use a malloc inside modify in order to reserve a space in the memory? Or is it possible to just set the modify function as:
void modify(s8 *strings[9][95])
Right now, my issue is the following: I get a warning on the last line (modify(&strings))about the pointer type that is incorrect.
passing argument 1 of 'modify' from incompatible pointer type
Thanks for your answers!