can you tell me the error here? gcc (im using linux) says i have more than one type def in the struct declaration... i dun see how but then again, thats why im learning
#include<stdio.h>
int count;
struct entry
{
char fname[19];
char lname[19];
char phnum[10];
}
struct entry list[3];
int main(void)
{
for(count=0; count<4; count++)
{
printf("\n\nEnter Name of Person %d\n>>", count+1);
scanf("%s %s", list[count].fname, list[count].lname);
printf("\nEnter Phone Nmber (w/ hyphen)\n>>"
scanf("%s", list[count].phnum);
}
for(count=0; count<4; count++);
{
printf("\nName: %s %s\t\tPhone: %s\n", list[count].fname, list[count].lname, list[count].phnum);
}
return 0;
}
žÅNžÅ
#include<stdio.h>
int count;
struct entry
{
char fname[19];
char lname[19];
char phnum[10];
}
struct entry list[3];
int main(void)
{
for(count=0; count<4; count++)
{
printf("\n\nEnter Name of Person %d\n>>", count+1);
scanf("%s %s", list[count].fname, list[count].lname);
printf("\nEnter Phone Nmber (w/ hyphen)\n>>"
scanf("%s", list[count].phnum);
}
for(count=0; count<4; count++);
{
printf("\nName: %s %s\t\tPhone: %s\n", list[count].fname, list[count].lname, list[count].phnum);
}
return 0;
}
žÅNžÅ