F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_20611088_7082.cpp: In function 'bool c(Lstudent, Lstudent)':
0_0_20611088_7082.cpp:4:236: error: 'strcmp' was not declared in this scope
     using namespace std;typedef struct{    int timecheck[8][12];    char name[30];}student;typedef struct{    char Lname[30];}Lstudent;student book[201];Lstudent buf[201];bool c(Lstudent a,Lstudent b){    return (strcmp(a.Lname,b.Lname)<0);}int main(){    int n,i,b,t,k,l,x,b1,e1,count;    scanf("%d",&n);    for(i=0;i<n;i++)    {        memset(book, 0, sizeof(book));        memset(buf, 0, sizeof(buf));        scanf("%d",&t);        for(b=0;b<t;b++)        {            scanf("%s",book[b].name);            scanf("%d",&k);            for(l=0;l<k;l++)            {                scanf("%d%d%d",&x,&b1,&e1);                for(int o=b1;o<=e1;o++)                {                    book[b].timecheck[x][o]=1;                 }            }        }        scanf("%d",&k);        for(l=0;l<k;l++)        {            int first=1;            count=0;            scanf("%d%d%d",&x,&b1,&e1);            for(b=0;b<t;b++)            {                for(int o=b1;o<=e1;o++)                {                    if(book[b].timecheck[x][o]==1)                    {                        strcpy(buf[count].Lname,book[b].name);                        count++;                        break;                    }                }            }            if(count==0)            {                printf("None\n");            }            else            {                sort(buf,buf+count,c);                for(int y=0;y<count;y++)                {                    if(first)                        first=0;                    else                        printf(" ");                    printf("%s",buf[y].Lname);                }                printf("\n");            }        }     }}
                                                                                                                                                                                                                                            ^
0_0_20611088_7082.cpp: In function 'int main()':
0_0_20611088_7082.cpp:4:367: error: 'memset' was not declared in this scope
     using namespace std;typedef struct{    int timecheck[8][12];    char name[30];}student;typedef struct{    char Lname[30];}Lstudent;student book[201];Lstudent buf[201];bool c(Lstudent a,Lstudent b){    return (strcmp(a.Lname,b.Lname)<0);}int main(){    int n,i,b,t,k,l,x,b1,e1,count;    scanf("%d",&n);    for(i=0;i<n;i++)    {        memset(book, 0, sizeof(book));        memset(buf, 0, sizeof(buf));        scanf("%d",&t);        for(b=0;b<t;b++)        {            scanf("%s",book[b].name);            scanf("%d",&k);            for(l=0;l<k;l++)            {                scanf("%d%d%d",&x,&b1,&e1);                for(int o=b1;o<=e1;o++)                {                    book[b].timecheck[x][o]=1;                 }            }        }        scanf("%d",&k);        for(l=0;l<k;l++)        {            int first=1;            count=0;            scanf("%d%d%d",&x,&b1,&e1);            for(b=0;b<t;b++)            {                for(int o=b1;o<=e1;o++)                {                    if(book[b].timecheck[x][o]==1)                    {                        strcpy(buf[count].Lname,book[b].name);                        count++;                        break;                    }                }            }            if(count==0)            {                printf("None\n");            }            else            {                sort(buf,buf+count,c);                for(int y=0;y<count;y++)                {                    if(first)                        first=0;                    else                        printf(" ");                    printf("%s",buf[y].Lname);                }                printf("\n");            }        }     }}
                                                                                                                                                                                                                                                                                                                                                                               ^
0_0_20611088_7082.cpp:4:1118: error: 'strcpy' was not declared in this scope
     using namespace std;typedef struct{    int timecheck[8][12];    char name[30];}student;typedef struct{    char Lname[30];}Lstudent;student book[201];Lstudent buf[201];bool c(Lstudent a,Lstudent b){    return (strcmp(a.Lname,b.Lname)<0);}int main(){    int n,i,b,t,k,l,x,b1,e1,count;    scanf("%d",&n);    for(i=0;i<n;i++)    {        memset(book, 0, sizeof(book));        memset(buf, 0, sizeof(buf));        scanf("%d",&t);        for(b=0;b<t;b++)        {            scanf("%s",book[b].name);            scanf("%d",&k);            for(l=0;l<k;l++)            {                scanf("%d%d%d",&x,&b1,&e1);                for(int o=b1;o<=e1;o++)                {                    book[b].timecheck[x][o]=1;                 }            }        }        scanf("%d",&k);        for(l=0;l<k;l++)        {            int first=1;            count=0;            scanf("%d%d%d",&x,&b1,&e1);            for(b=0;b<t;b++)            {                for(int o=b1;o<=e1;o++)                {                    if(book[b].timecheck[x][o]==1)                    {                        strcpy(buf[count].Lname,book[b].name);                        count++;                        break;                    }                }            }            if(count==0)            {                printf("None\n");            }            else            {                sort(buf,buf+count,c);                for(int y=0;y<count;y++)                {                    if(first)                        first=0;                    else                        printf(" ");                    printf("%s",buf[y].Lname);                }                printf("\n");            }        }     }}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              ^


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-16 07:57:57, Gzip enabled