I'm currently working on a school project. I have to develop a program that is controlling an IP and developing his specs.
I'm stuck with a bidimensionnal array of char. I don't know how to return it properly.
char** extraction_ip(char **ip){
char *ch;
char ipv4 [4][3];
int i = 0;
ch = *ip;
*ipv4 [i]=strtok(ch, ".");
while (ipv4 [i]!= NULL){
i++;
*ipv4 [i]=strtok(NULL, ".");
}
return ipv4;
}
AND before, i tried doing this by making a void function: enter image description here