hello, I have an array as follows
I need to do is to allocate the values dynamically,Code:char matriz_teste[][10] = { "11111111", "22222222", "33333333" };
ie have a string with the values
need to get the values of "base" and put in matriz_testeCode:char *base = "11111111;22222222;33333333";
I did it this way
more is not workingCode:char **matriz_teste; matriz_teste = (char **)malloc(3 * sizeof(char *)); for(i=0;i<3;i++) { matriz_teste[i] = (char *)malloc(10 * sizeof(char)); strcpy(matriz_teste[i], "test"); }
I have to pass "matriz_teste" to the function
sorry my englishCode:function_matrix("Text test", (char*)matriz_teste[0], sizeof(matriz_teste));



LinkBack URL
About LinkBacks


