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]);
^
|