結果
| 問題 |
No.304 鍵(1)
|
| コンテスト | |
| ユーザー |
ldsyb
|
| 提出日時 | 2016-02-25 14:30:17 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
CE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 229 bytes |
| コンパイル時間 | 282 ms |
| コンパイル使用メモリ | 50,800 KB |
| 最終ジャッジ日時 | 2024-11-14 19:35:01 |
| 合計ジャッジ時間 | 627 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:10:23: error: no match for ‘operator==’ (operand types are ‘std::basic_istream<char>’ and ‘const char [9]’)
10 | if(cin >> input == "unlocled") break;
| ~~~~~~~~~~~~ ^~ ~~~~~~~~~~
| | |
| | const char [9]
| std::basic_istream<char>
In file included from /usr/include/c++/11/iosfwd:40,
from /usr/include/c++/11/ios:38,
from /usr/include/c++/11/ostream:38,
from /usr/include/c++/11/iostream:39,
from main.cpp:1:
/usr/include/c++/11/bits/postypes.h:222:5: note: candidate: ‘template<class _StateT> bool std::operator==(const std::fpos<_StateT>&, const std::fpos<_StateT>&)’
222 | operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
| ^~~~~~~~
/usr/include/c++/11/bits/postypes.h:222:5: note: template argument deduction/substitution failed:
main.cpp:10:26: note: ‘std::basic_istream<char>’ is not derived from ‘const std::fpos<_StateT>’
10 | if(cin >> input == "unlocled") break;
| ^~~~~~~~~~
In file included from /usr/include/c++/11/bits/stl_algobase.h:64,
from /usr/include/c++/11/bits/char_traits.h:39,
from /usr/include/c++/11/ios:40,
from /usr/include/c++/11/ostream:38,
from /usr/include/c++/11/iostream:39,
from main.cpp:1:
/usr/include/c++/11/bits/stl_pair.h:466:5: note: candidate: ‘template<class _T1, class _T2> constexpr bool std::operator==(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&)’
466 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/11/bits/stl_pair.h:466:5: note: template argument deduction/substitution failed:
main.cpp:10:26: note: ‘std::basic_istream<char>’ is not derived from ‘const std
ソースコード
#include <iostream>
#include <string>
using namespace std;
int main(){
string input;
for(int i = 0;i < 1000;i++){
if(i < 100) cout << "00";
cout << i << endl;
if(cin >> input == "unlocled") break;
}
}
ldsyb