C++
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
Runtime options...
- voluntas
- @ignis_fatuus
- ブン
- 清楚なC++メイドBOT
- @tzik_tack
- 長谷川一輝
- wraith13
- @jj1bdx
- @cpp_akira
- 安藤敏彦
- @srz_zumix
- Siv3D
- takezoh
- まろ
- @okdshin
- @hnokx
- @ishidakei
- @take_cheeze
- TAKEI Yuya
- @mumumu
- 黒澤 亮二
- I (@wx257osn2)
- @gnaggnoyil
- @mandel59
- Tommy6
- イズカワタカノブ
- @tyottyoworks
- ___shanon
- わたやん
- @KorekaraSEDB
- @kariya_mitsuru
- @ciniml
- @beam2d
- @grafi_tt
- @nekketsuuu
- LouiS0616
- @volanja
- 大鎌広
x
13
1
2
int main()
3
{
4
string yes = "YES";
5
string no = "NO";
6
\\do something
7
if (condition){
8
cout << yes;}
9
else{
10
cout << no;}
11
return 0;
12
}
13
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.73.0/gcc-10.1.0/include -std=gnu++2a
Start
prog.cc:6:1: error: stray '\' in program 6 | \\do something | ^ prog.cc:6:2: error: stray '\' in program 6 | \\do something | ^ prog.cc: In function 'int main()': prog.cc:4:1: error: 'string' was not declared in this scope 4 | string yes = "YES"; | ^~~~~~ prog.cc:4:1: note: suggested alternatives: In file included from /opt/wandbox/gcc-10.1.0/include/c++/10.1.0/iosfwd:39, from /opt/wandbox/gcc-10.1.0/include/c++/10.1.0/ios:38, from /opt/wandbox/gcc-10.1.0/include/c++/10.1.0/ostream:38, from /opt/wandbox/gcc-10.1.0/include/c++/10.1.0/iostream:39, from prog.cc:1: /opt/wandbox/gcc-10.1.0/include/c++/10.1.0/bits/stringfwd.h:79:33: note: 'std::string' 79 | typedef basic_string<char> string; | ^~~~~~ In file included from /opt/wandbox/gcc-10.1.0/include/c++/10.1.0/bits/locale_classes.h:40, from /opt/wandbox/gcc-10.1.0/include/c++/10.1.0/bits/ios_base.h:41, from /opt/wandbox/gcc-10.1.0/include/c++/10.1.0/ios:42, from /opt/wandbox/gcc-10.1.0/include/c++/10.1.0/ostream:38, from /opt/wandbox/gcc-10.1.0/include/c++/10.1.0/iostream:39, from prog.cc:1: /opt/wandbox/gcc-10.1.0/include/c++/10.1.0/string:67:11: note: 'std::pmr::string' 67 | using string = basic_string<char>; | ^~~~~~ prog.cc:5:7: error: expected ';' before 'no' 5 | string no = "NO"; | ^~~ | ; prog.cc:6:6: error: 'something' was not declared in this scope 6 | \\do something | ^~~~~~~~~ prog.cc:9:13: error: expected 'while' before '{' token 9 | else{ | ^ prog.cc:9:13: error: expected '(' before '{' token 9 | else{ | ^ | ( prog.cc:9:13: error: expected primary-expression before '{' token prog.cc:9:13: error: expected ')' before '{' token 9 | else{ | ^ | ) prog.cc:9:13: error: expected ';' before '{' token 9 | else{ | ^ | ; prog.cc:10:12: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 10 | cout << no;} | ^~~~ | std::cout In file included from prog.cc:1: /opt/wandbox/gcc-10.1.0/include/c++/10.1.0/iostream:61:18: note: 'std::cout' declared here 61 | extern ostream cout; /// Linked to standard output | ^~~~ prog.cc:10:20: error: 'no' was not declared in this scope 10 | cout << no;} | ^~
1
Finish