Run Code | API | Code Wall | Misc | Feedback | Login | Theme | Privacy | Patreon |
lab 12 v0.1Error(s): source_file.c: In function ‘getoldest’: source_file.c:18:24: error: ‘N’ undeclared (first use in this function) for(int i=0;i<N;i++){ ^ source_file.c:18:24: note: each undeclared identifier is reported only once for each function it appears in source_file.c:19:24: error: subscripted value is neither array nor pointer nor vector if(persons[i].age>Max) ^ source_file.c:19:32: error: ‘Max’ undeclared (first use in this function) if(persons[i].age>Max) ^ source_file.c:22:35: error: subscripted value is neither array nor pointer nor vector printf("%d %s\n",persons[Maxage].age,persons[Maxage].person_name); ^ source_file.c:22:55: error: subscripted value is neither array nor pointer nor vector printf("%d %s\n",persons[Maxage].age,persons[Maxage].person_name); ^ source_file.c:17:14: warning: variable ‘Maxage’ set but not used [-Wunused-but-set-variable] int Maxage=0; ^ source_file.c: In function ‘main’: source_file.c:36:15: error: incompatible type for argument 1 of ‘getoldest’ getoldest(persons->age); ^ source_file.c:16:5: note: expected ‘person {aka struct <anonymous>}’ but argument is of type ‘int’ int getoldest(person persons){ ^ source_file.c:30:5: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d",&N); ^ |
λ
.NET NoSQL database for rapid development
|