错误原因:19行 92列 和 19行 100列(大概是printf的位置)[Error]cannot pass objects of non-trivially-copyable type 'std::string{aka class std::basic_string<char>}' through '...'
by yyz0526 @ 2024-03-17 12:10:13
@[yyz0526](/user/1284180) printf 不能输出 string,解决方法可以百度
by DioxygenDifluoride @ 2024-03-17 12:31:25
printf的%s只能输出c字符串,也就是只能输出char数组
要解决可以在name[i]和name[j]后面加上.c_str
by EthanSong @ 2024-03-17 12:31:50
@[yyz0526](/user/1284180)
by EthanSong @ 2024-03-17 12:32:04
@[EthanSong](/user/628691) ```cpp
printf("%s %s\n",name[i].c_str,name[j].c_str);
```
是这样吗?
这样好像也不对
by yyz0526 @ 2024-03-17 12:36:23
这是个函数,要加括号
by EthanSong @ 2024-03-17 12:37:17
@[yyz0526](/user/1284180) 后面忘记加括号了
by yyz0526 @ 2024-03-17 12:38:13
@[yyz0526](/user/1284180) 现在又RE了...
by yyz0526 @ 2024-03-17 12:54:43