skuska inputu

This commit is contained in:
Damián Korpesio 2021-10-06 18:43:24 +02:00
parent 643165b818
commit 40cf04856b

View File

@ -7,36 +7,45 @@ struct Pizza {
char name[LINESIZE];
};
int nacitaj(struct Pizza* polozka){
return 0;
}
int matches(heap, needle){
return 0;
//int matches(heap, needle){
// return 0;
}
char r[LINESIZE];
char hacker_script(char c){
if (c == '5'){
r == 'S';
}
return r;
}
//}
//char hacker_script(char c){
// if (c == '5'){
// r == 'S';
// }
// return r;
//}
int main (){
char search_string[LINESIZE] = "Ostiepkova";
size_t velkost = 0;
char line[LINESIZE];
memset(line, 0, LINESIZE);
//char search_string[LINESIZE] = "Ostiepkova";
while(1){
char *r = fgets(line, LINESIZE, stdin);
if (r == NULL){
velkost = strlen(line);
if (r == NULL || velkost == 1){
printf("%s", line);
break;
}
struct Pizza pizza;
memset(line, 0,sizeof(struct Pizza));
strcpy(pizz->name, line);
if (matches(search_string, line)){
printf("%s", pizza->name)
}
strcpy(pizza.name, line);
//if (matches(search_string. line)){
// printf("%s", pizza->name);
//}
// strcpy(pizz->name, line);
// if (matches(search_string, line)){
// printf("%s", pizza->name)
// }
//
}