ds
This commit is contained in:
parent
14855a54d4
commit
0e205349ec
@ -20,20 +20,23 @@ int main(){
|
||||
int size = 0;
|
||||
|
||||
while(1){
|
||||
char line[SIZE];
|
||||
memset(line,0,SIZE);
|
||||
char* r = fgets(line,SIZE,stdin);
|
||||
if (r == NULL){
|
||||
char line[SIZE];
|
||||
memset(line,0,SIZE);
|
||||
char* r = fgets(line,SIZE,stdin);
|
||||
if (r == NULL){
|
||||
// Nastal koniec načítania
|
||||
break;
|
||||
}
|
||||
|
||||
char* end = NULL;
|
||||
int value = strtol(line,&end,10);
|
||||
if (value == 0){
|
||||
if (value == 0&&line[0]=='\n'){
|
||||
// Premena sa nepodarila
|
||||
break;
|
||||
}
|
||||
}else if(value==0&&line[0]!='\n'){
|
||||
printf("Nepodarilo nacitat nic\n");
|
||||
return 0;
|
||||
}
|
||||
char *name=end+1;
|
||||
|
||||
int id = find_student(databaza,size,name);
|
||||
|
Loading…
Reference in New Issue
Block a user