C compile errors: stray '\200' in program and expected ')' before numeric constant

后端 未结 4 2066
一整个雨季
一整个雨季 2021-01-18 07:38

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

4条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-18 08:01

    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:

    toFrequency = (toFrequency – 1);
                               ^
    

    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.)

提交回复
热议问题