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_34076792_4612.cpp: In function 'bool cmp1(bill, bill)':
0_0_34076792_4612.cpp:11:27: error: cannot convert 'std::string {aka std::basic_string<char>}' to 'const char*' for argument '1' to 'int strcmp(const char*, const char*)'
  return strcmp(a.pla,b.pla)>0;
                           ^
0_0_34076792_4612.cpp: In function 'bool cmp2(bill, bill)':
0_0_34076792_4612.cpp:15:23: error: cannot convert 'std::string {aka std::basic_string<char>}' to 'const char*' for argument '1' to 'int strcmp(const char*, const char*)'
  if(strcmp(a.pla,b.pla)==0)
                       ^
0_0_34076792_4612.cpp:16:29: error: cannot convert 'std::string {aka std::basic_string<char>}' to 'const char*' for argument '1' to 'int strcmp(const char*, const char*)'
  return strcmp(a.name,b.name)<0;
                             ^
0_0_34076792_4612.cpp: In function 'int main()':
0_0_34076792_4612.cpp:38:32: error: cannot convert 'std::string {aka std::basic_string<char>}' to 'const char*' for argument '1' to 'int strcmp(const char*, const char*)'
     if(strcmp(a[j].pla,a[i].pla)==0)//同一个地名下细分品种 
                                ^
0_0_34076792_4612.cpp:40:35: error: cannot convert 'std::string {aka std::basic_string<char>}' to 'const char*' for argument '1' to 'int strcmp(const char*, const char*)'
      if(strcmp(a[j].name,a[i].name)==0)//品种相同 
                                   ^


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-12-02 17:54:50, Gzip enabled