#include <stdio.h>
#include <string.h>

int str2array(char **pparv, char *string, char *delim);

int str2array(char **pparv, char *string, char *delim) {
    char *tok;
    int pparc = 0;
    tok = strtok(string, delim);
    while (tok != NULL) {
        pparv[pparc++] = tok;
        tok = strtok(NULL, delim);
    }
    return pparc;
}

int main() {

        char *dom = "111.222.333.444";
        char **ar;
        int p = 0;
        printf("hmh");
        p = str2array(ar,dom,".");
        printf("first: %s second: %s",ar[1],ar[2]);
        return(1);
}
