ログイン
新規登録
AtsuoCoder Petrozavodsk Contest 001
読込中…
Home
Tasks
Clar
Submissions
Standings
提出 bccefaab-ab57-4f60-b918-0ef15422cb37
コード
#ifndef MYHEADER_H #define MYHEADER_H // ヘッダーの内容 class MyClass {...}; #endif // MYHEADER_H int main() { int s; cin >> s; string str = s; str.at('A') = 'P'; // char型の'M' str.at('P') = 'C'; str.at('C') = 'A'; cout << s << endl; // Mello str.append("MAN"); }
結果
問題
点数
言語
結果
実行時間
メモリ
D - PACMAN
0
C++
WJ
0 ms
0 KiB
コンパイルエラー
Main.cpp:5:16: error: expected unqualified-id before '...' token 5 | class MyClass {...}; | ^~~ Main.cpp: In function 'int main()': Main.cpp:11:5: error: 'cin' was not declared in this scope 11 | cin >> s; | ^~~ Main.cpp:12:3: error: 'string' was not declared in this scope 12 | string str = s; | ^~~~~~ Main.cpp:13:3: error: 'str' was not declared in this scope; did you mean 'std'? 13 | str.at('A') = 'P'; // char型の'M' | ^~~ | std Main.cpp:16:3: error: 'cout' was not declared in this scope 16 | cout << s << endl; // Mello | ^~~~ Main.cpp:16:16: error: 'endl' was not declared in this scope 16 | cout << s << endl; // Mello | ^~~~