Created
June 11, 2012 10:34
-
-
Save vladfulgeanu/2909490 to your computer and use it in GitHub Desktop.
vector of strongs/ char matrix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
void print(char ** x){ | |
for(int i = 0; i < strlen(x); i++) | |
printf("%s\n", x[i]); | |
} | |
int main(){ | |
char **x = {"ana", "are", "mere"}; | |
print(x); | |
getchar(); | |
return 0; | |
} |
missing indentation
it's compilling but it has a lot of warnings and it gives seg fault
line 3 : you have to keep the number of lines of your matrix char *x[3]
line 4 : tab and strlen does not work on a matrix .
line 5 : double tab
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Functia print nu este intentata, in rest pare ok.