简体   繁体   English

C:错误:预期')'之前';' 代币

[英]C: error: expected ')' before ';' token

This seems like the simplest code, but I don't know why it won't compile: 这似乎是最简单的代码,但我不知道为什么它不会编译:

    switch(choice) {
        case 0:
            printf("%d", LOOP_LIMIT); /* this line gives the error */
            break;
        case 1:

when I comment out the line it compiles fine 当我评论出这条线时,它编译得很好

Your code has something like this: 你的代码有这样的东西:

#define LOOP_LIMIT 10;
                     ^
                    Remove this semicolon.

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM