Я видел несколько способов создания многострочного HTML, но один из них мне показался более удобным (за исключением того, что есть способ разместить HTML на отдельной странице, что было бы здорово). Тем не менее я получаю сообщение об ошибке при попытке скомпилировать его на Arduino Ide. Это ошибки, которые я получаю:
И это мой HTML-код
Я называю это так:
Решение
Я полагаю, вы компилируете чип ESP8266 в Arduino IDE.
Обратите внимание, что в вашем коде у вас есть:
Здесь вы использовали фигурные цитаты который НЕ символ ASCII.
Другие решения
В дополнение к вышесказанному, вам также необходимо убедиться, что любые кавычки, которые появляются внутри вашей строки, например, в сбежали. В противном случае компилятор будет рассматривать их как конец строки в кавычках и попытаться проанализировать то, что следует после, как оператор.
Чтобы избежать их, добавьте обратную косую черту, например так: ,
В качестве альтернативы вы можете использовать одинарные кавычки везде внутри вашего HTML. Они не будут конфликтовать с двойными кавычками, содержащими весь HTML.
hi I’m trying to write a program for a simple game but getting errors stray ‘342’ and ‘200’ and ‘214’ using g++ and gedit in ubuntu 13.10. the code is:
and terminal out put is:
even tried to to compile this:
and terminal says again:
can anyone help me with that?
note that I was installed ubuntu last night.
4 Answers 4
You are using a Zero Width Non Joiner character after the >> in your code. This is a unicode character that is encoded in UTF-8 as three characters with values 0x2e , 0x80 , 0x8c (or in base 8, 342 , 200 , 214 ). This probably happened because you copy and pasted some code from a document (html web page?) that uses those special characters.
The C++ language require that the whole program uses mostly the ASCII encoding, except for the content of strings or character literals (that may be in a implementation-dependent encoding). So to fix your problem, make sure that you only use simple ASCII space, quotes, double quotes and not smart characters.
I’ve copy-pasted that into Python and found out that between >> and the following space there are 3 characters: xe2 x80 x8c . Decode them as UTF-8 and you get a ZERO WIDTH NON-JOINER.
How it got into your code, I don’t know. Find it out. Anything interesting about the editor you’re using? Your keyboard layout?
Apart from what was said you have also one more error related to using variable player_choice outside its scope.
It was defined in the while loop before the code snippet above and was destroyed after exiting the loop. So using it in this if statement is illegal.
I copy pasted your code snippet, completely unmodified, and found that you have a seriously funky space character after cin >> . Look below:

Get rid of the , and you should be able to compile just fine. Depending on the editor you’re using, you may or may not be able to see it printed like this.
I copied this program and am having trouble with the void downFrequency function (I think). This is for Arduino Uno. Here are the compiler errors: Compiling ‘MY_dds’ for ‘Arduino Uno’
Here is the program:
3 Answers 3
You’ve somehow ended up with «en dash» characters, rather than normal minus signs, in the downFrequency function.
Make sure you’re editing using a text editor, not a word processor; and for each of these:
delete the marked character, and retype as a normal minus sign.
(If you’re interested in the gory details, the «dash» character is Unicode 2013, encoded in UTF-8 as three bytes with octal values 324,200,223, which is why you see those numbers in the error messages.)