QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#145457 | #4190. Grid Delivery | MaMengQi | Compile Error | / | / | C++20 | 577b | 2023-08-22 13:38:33 | 2023-08-22 13:38:34 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
詳細信息
answer.code: In function ‘int main()’: answer.code:15:21: error: no match for ‘operator>>’ (operand types are ‘std::istream’ {aka ‘std::basic_istream<char>’} and ‘char*’) 15 | cin >> (g[i] + 1); | ~~~ ^~ ~~~~~~~~~~ | | | | | char* | std::istream {aka std::basic_istream<char>} In file included from /usr/include/c++/11/iostream:40, from answer.code:3: /usr/include/c++/11/istream:168:7: note: candidate: ‘std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>]’ (near match) 168 | operator>>(bool& __n) | ^~~~~~~~ /usr/include/c++/11/istream:168:7: note: conversion of argument 1 would be ill-formed: answer.code:15:30: error: cannot bind non-const lvalue reference of type ‘bool&’ to a value of type ‘char*’ 15 | cin >> (g[i] + 1); | ~~~~~~^~~~ In file included from /usr/include/c++/11/iostream:40, from answer.code:3: /usr/include/c++/11/istream:172:7: note: candidate: ‘std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]’ (near match) 172 | operator>>(short& __n); | ^~~~~~~~ /usr/include/c++/11/istream:172:7: note: conversion of argument 1 would be ill-formed: answer.code:15:30: error: invalid conversion from ‘char*’ to ‘short int’ [-fpermissive] 15 | cin >> (g[i] + 1); | ~~~~~~^~~~ | | | char* answer.code:15:30: error: cannot bind rvalue ‘(short int)(((char*)(& g[i])) + 1)’ to ‘short int&’ In file included from /usr/include/c++/11/iostream:40, from answer.code:3: /usr/include/c++/11/istream:175:7: note: candidate: ‘std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>]’ (near match) 175 | operator>>(unsigned short& __n) | ^~~~~~~~ /usr/include/c++/11/istream:175:7: note: conversion of argument 1 would be ill-formed: answer.code:15:30: error: invalid conversion from ‘char*’ to ‘short unsigned int’ [-fpermissive] 15 | cin >> (g[i] + 1); | ~~~~~~^~~~ | | | char* answer.code:15:30: error: cannot bind rvalue ‘(short unsigned int)(((char*)(& g[i])) + 1)’ to ‘short unsigned int&’ In file included from /usr/include/c++/11/iostream:40, from answer.code:3: /usr/include/c++/11/istream:179:7: note: candidate: ‘std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char; _Traits = std::char_traits<char>]’ (near match) 179 | operator>>(int& __n); | ^~~~~~~~ /usr/include/c++/11/istream:179:7: note: conversion of argument 1 would be ill-formed: answer.code:15:30: error: invalid conversion from ‘char*’ to ‘int’ [-fpermissive] 15 | cin >> (g[i] + 1); | ~~~~~~^~~~ | | | char* answer.code:15:30: error: cannot bind rvalue ‘(int)(((char*)(& g[i])) + 1)’ to ‘int&’ In file included from /usr/include/c++/11/iostream:40, from answer.code:3: /usr/include/c++/11/istream:182:7: note: candidate: ‘std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>]’ (near match) 182 | operator>>(unsigned int& __n) | ^~~~~~~~ /usr/include/c++/11/istream:182:7: note: conversion of argument 1 would be ill-formed: answer.code:15:30: error: invalid conversion from ‘char*’ to ‘unsigned int’ [-fpermissive] 15 | cin >> (g[i] + 1); | ~~~~~~^~~~ | | | char* answer.code:15:30: error: cannot bind rvalue ‘(unsigned int)(((char*)(& g[i])) + 1)’ to ‘unsigned int&’ In file included from /usr/include/c++/11/iostream:40, from answer.code:3: /usr/include/c++/11/istream:186:7: note: candidate: ‘std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = s...