ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#212092 | #3817. 写字 | Alex9876 | Compile Error | / | / | C++ | 192b | 2024-10-13 11:10:19 | 2024-10-13 12:22:05 |
answer
#include<bits/stdc++.h>//骗分
int main()
{
int a,b;
std::cin>>a>>b;
std::string c,d;
std::cin>>c>>d;
if(c=="niskoobrazovan"and d="boook")std::cout<<5;
else{std::cout<<-1;}
}
详细
answer.code: In function 'int main()': answer.code:8:24: error: no match for 'operator&&' (operand types are 'bool' and 'std::string {aka std::basic_string<char>}') if(c=="niskoobrazovan"and d="boook")std::cout<<5;\x0d ^ answer.code:8:24: note: candidates are: answer.code:8:24: note: operator&&(bool, bool) <built-in> answer.code:8:24: note: no known conversion for argument 2 from 'std::string {aka std::basic_string<char>}' to 'bool' In file included from /usr/include/x86...