小编And*_*CRD的帖子

宏 - 表达式不可分配

编译时出现此错误:

macro.c:11:2: error: expression is not assignable
    ProdottoAumentato(10, 20);
Run Code Online (Sandbox Code Playgroud)

我不知道为什么会这样说,我找不到任何错误.这是代码:

#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>

#define ProdottoAumentato(X, Y)    X++; X * Y;

int main(void) {

    ProdottoAumentato(10, 20);

    printf("\nEnd\n");
    return(0);
}
Run Code Online (Sandbox Code Playgroud)

c macros c-preprocessor

-2
推荐指数
2
解决办法
575
查看次数

标签 统计

c ×1

c-preprocessor ×1

macros ×1