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_17224802_11597.cpp: In function 'int main()':
0_0_17224802_11597.cpp:15:28: error: cannot pass objects of non-trivially-copyable type 'std::string {aka class std::basic_string<char>}' through '...'
    scanf("%s", dictionary[i]);
                            ^
0_0_17224802_11597.cpp:23:36: 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(dictionary[i], word))
                                    ^
0_0_17224802_11597.cpp:34:34: error: cannot convert 'std::string {aka std::basic_string<char>}' to 'const char*' for argument '1' to 'size_t strlen(const char*)'
      numb1 = strlen(dictionary[i]);//正确单词的字母个数
                                  ^
0_0_17224802_11597.cpp:49:64: error: cannot pass objects of non-trivially-copyable type 'std::string {aka class std::basic_string<char>}' through '...'
        printf("%s is a misspelling of %s\n", word, dictionary[i]);
                                                                ^
0_0_17224802_11597.cpp:54:64: error: cannot pass objects of non-trivially-copyable type 'std::string {aka class std::basic_string<char>}' through '...'
        printf("%s is a misspelling of %s\n", word, dictionary[i]);          
                                                                ^
0_0_17224802_11597.cpp:68:64: error: cannot pass objects of non-trivially-copyable type 'std::string {aka class std::basic_string<char>}' through '...'
        printf("%s is a misspelling of %s\n", word, dictionary[i]);
                                                                ^
0_0_17224802_11597.cpp:82:64: error: cannot pass objects of non-trivially-copyable type 'std::string {aka class std::basic_string<char>}' through '...'
        printf("%s is a misspelling of %s\n", word, dictionary[i]);
                                                                ^


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-06-26 20:50:27, Gzip enabled