“error: stray '\342' ”, “stray '\200' ”, “stray '\234' ” in C compiling?

后端 未结 1 1242
执念已碎
执念已碎 2021-01-29 07:34

I understand this kind of question has been asked before, please don\'t crucify me for it. I used NotePad++ to write the code, and when I tried to compile it (I used cc lab7.c -

相关标签:
1条回答
  • 2021-01-29 08:38

    There are a couple of issues with your code:

    lab7.c:58:45: error: expected ‘)’ before ‘inputNum’
    printf("The integer %i in decimal is %d" inputNum, inputNum);
                                             ^
    

    You are missing a comma right before the indicated location, and in several similar lines which follow.

    printf (“Do you want to …”);
            ^                ^
    

    The quotation marks in the locations I've indicated are both "smart quotes" (“/”), not normal quotation marks. Retype them.

    The same issue applies to each of the following errors regarding “%c”.

    0 讨论(0)
提交回复
热议问题