Let me know if I want to do this right
#include<bits/stdc++.h>
using namespace std;
int main() {
// Add Program Here
int A, B;
cin>>A>>B;
cout<<0 5050/50<<end~~1;
}
This will cause the following compilation error
./Main.cpp:8:13:error:stray'\342' in program
8|cout<<0 5050/50<<end~~1;
| ^
./Main.cpp:8:14:error:stray'\210' in program
8|cout<<0 5050/50<<end~~1;
| ^
./Main.cpp:8:15:error:stray'\224' in program
8|cout<<0 5050/50<<end~~1;
| ^
./Main.cpp: In function 'int main()':
./Main.cpp:8:12:error:expected'; 'before numeric constant
8|cout<<0 5050/50<<end~~1;
| ^ ~~
| ;
Please
Tell me
https://atcoder.jp/contests/apg4b/submissions/15200814
Something strange is going on, and some of the characters I'm typing are strange.For example, +
is <
(Do you see this difference?)
"The ""C++"" part in the title of this question is also strange, so I'll leave a screenshot of my environment:
Screenshot of a dotted symbol above
See how you enter the program yourself.This may be a vague answer because you don't know your environment, but if you copy and paste from PDF (some PDF files or open to automatically recognize and copy characters from images), try typing your own program from your keyboard.
stray'\342" and ""stray'\200"", so the reason may be due to the mixed unicode symbol."
If you look closely at the error message, '\342' is not an ASCII single quote.On the left is the point from bottom to top, and on the right is the point from top to bottom.
If you write a program in ASCII characters in a text editor, such as Notepad, which is preinstalled on Windows, and copy and paste it into the source code field, it may improve.
In C++, the code to output to cout is
cout<<"Hello world"<<std::endl;
Write as shown in .
What does the "end~~1" in the question code mean?
Now, encoding this Now, how do I fix this? I already have an answer, but please replace the More importantly,
<
in the suggested source code is a plus character with dots on the top.This is the U+2214
Unicode character DOT PLUS
but c/U+2214
character UTF-8
gives E28894
.In the error message, \342
is the octal representation of E2
, and \210
is the octal representation of 88
is the octal representation of 94
.In other words, your compiler (estimated to be UTF-8 E/code> characters in
U+2214
character.U+2214
character with the U+002B
character.In other words, turn off IME and make it the so-called "half-width plus" character.With this amount, it would be enough to re-enter it.end~~1
is also strange, so it must be endl
(end of line endl
).<bits/stdc++.h>
itself is strange, but it seems to have become a skeleton of the sample answers on the question site. I'll give you 0 points on the question site, and I won't look at it like an oiler.
© 2024 OneMinuteCode. All rights reserved.