QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#554947 | #8044. Pattern Matching in A Minor "Low Space" | HuangHanSheng | Compile Error | / | / | C++20 | 568b | 2024-09-09 18:17:08 | 2024-09-09 18:17:09 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
詳細信息
answer.code: In function ‘int main()’: answer.code:13:9: error: no match for ‘operator>>’ (operand types are ‘std::istream’ {aka ‘std::basic_istream<char>’} and ‘char*’) 13 | cin >> p+1 >> s+1; | ~~~ ^~ ~~~ | | | | | char* | std::istream {aka std::basic_istream<char>} In file included from /usr/include/c++/13/iostream:42, from answer.code:2: /usr/include/c++/13/istream:325:7: note: candidate: ‘std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(void*&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]’ (near match) 325 | operator>>(void*& __p) | ^~~~~~~~ /usr/include/c++/13/istream:325:7: note: conversion of argument 1 would be ill-formed: answer.code:13:13: error: cannot bind non-const lvalue reference of type ‘void*&’ to an rvalue of type ‘void*’ 13 | cin >> p+1 >> s+1; | ~^~ /usr/include/c++/13/istream:201:7: note: candidate: ‘std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]’ (near match) 201 | operator>>(unsigned long long& __n) | ^~~~~~~~ /usr/include/c++/13/istream:201:7: note: conversion of argument 1 would be ill-formed: answer.code:13:13: error: invalid conversion from ‘char*’ to ‘long long unsigned int’ [-fpermissive] 13 | cin >> p+1 >> s+1; | ~^~ | | | char* answer.code:13:13: error: cannot bind rvalue ‘(long long unsigned int)(((char*)(& p)) + 1)’ to ‘long long unsigned int&’ /usr/include/c++/13/istream:197:7: note: candidate: ‘std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]’ (near match) 197 | operator>>(long long& __n) | ^~~~~~~~ /usr/include/c++/13/istream:197:7: note: conversion of argument 1 would be ill-formed: answer.code:13:13: error: invalid conversion from ‘char*’ to ‘long long int’ [-fpermissive] 13 | cin >> p+1 >> s+1; | ~^~ | | | char* answer.code:13:13: error: cannot bind rvalue ‘(long long int)(((char*)(& p)) + 1)’ to ‘long long int&’ /usr/include/c++/13/istream:192:7: note: candidate: ‘std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]’ (near match) 192 | operator>>(unsigned long& __n) | ^~~~~~~~ /usr/include/c++/13/istream:192:7: note: conversion of argument 1 would be ill-formed: answer.code:13:13: error: invalid conversion from ‘char*’ to ‘long unsigned int’ [-fpermissive] 13 | cin >> p+1 >> s+1; | ~^~ | | | char* answer.code:13:13: error: cannot bind rvalue ‘(long unsigned int)(((char*)(& p)) + 1)’ to ‘long unsigned int&’ /usr/include/c++/13/istream:188: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>; __istream_type = std::basic_istream<char>]’ (near match) 188 | operator>>(long& __n) | ^~~~~~~~ /usr/include/c++/13/istream:188:7: note: conversion of argument 1 would be ill-formed: answer.code:13:13: error: invalid conversion from ‘char*’ to ‘long int’ [-fpermissive] 13 | cin >> p+1 >> s+1; | ~^~ | | | char* answer.code:13:13: error: cannot bind rvalue ‘(long int)(((char*)(& p)) + 1)’ to ‘long int&’ /usr/include/c++/13/istream:184: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>; __istream_type = std::basic_istream<char>]’ (near match) 184 | operator>>(unsigned int& __n) | ^~~~~~~~ /usr/include/c++/13/istream:184:7: note: conversion of argument 1 would be ill-formed: answer.code:13:13: error: invalid conversion from ‘char*’ to ‘unsigned int’ [-fpermissive] 13 | cin >> p+1 >> s+1; | ~^~ | | | char* answer.code:13:13: error: cannot bind rvalue ‘(unsigned int)(((char*)(& p)) + 1)’ to ‘unsigned int&’ /usr/include/c++/13/istream:181: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) 181 | operator>>(int& __n); | ^~~~~~~~ /usr/include/c...