Aktualizovat „du6/program.c“
This commit is contained in:
parent
f0baf5e69b
commit
a27af28f34
@ -26,19 +26,12 @@ int main()
|
||||
}
|
||||
int pm = 0;
|
||||
char** pole_smernikov = malloc(fullSIZE * sizeof(char));
|
||||
//char* success[SIZE];
|
||||
//char* unsuccess[SIZE];
|
||||
//memset(pole_smernikov,0,SIZE*sizeof(char*));
|
||||
int k = 0;
|
||||
char* line = malloc(wSIZE * sizeof(char));
|
||||
//memset(line,0,SIZE);
|
||||
//char* r;
|
||||
//int q = 0;
|
||||
size_t pocet_znakov = 0;
|
||||
int antiInfC = 0;
|
||||
char r = 'a';
|
||||
while (fgets(line,wSIZE,stdin)) {
|
||||
|
||||
while (fgets(line,wSIZE,stdin)) {
|
||||
k = 0;
|
||||
pocet_znakov = strlen(line);
|
||||
char* all = malloc(pocet_znakov);
|
||||
@ -47,7 +40,6 @@ int main()
|
||||
if(memcmp(pole_smernikov[x], line, pocet_znakov) == 0){
|
||||
k++;
|
||||
}
|
||||
//pole_smernikov[k] = line;
|
||||
}
|
||||
if(0 == k){
|
||||
pole_smernikov[pm] = all;
|
||||
@ -74,18 +66,8 @@ int main()
|
||||
pole_smernikov[j-1] = temp;
|
||||
}
|
||||
}
|
||||
// if (memcmp(pole_smernikov[i],line,pocet_znakov)){
|
||||
// // Nasiel som
|
||||
// unsuccess[k] = pole_smernikov[i];
|
||||
// printf("%s\n", unsuccess[k]);
|
||||
// } else{
|
||||
// success[q] = pole_smernikov[i];
|
||||
// printf("%s\n", success[q]);
|
||||
|
||||
// }
|
||||
i++;
|
||||
}
|
||||
// printf("%s\n", pole_smernikov[0]);
|
||||
if(NULL == pole_smernikov[1]){
|
||||
puts("Ziadne prihlasky");
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user