小编Lil*_*y S的帖子

Argument type 'void' is incomplete

我正在尝试编写此相对简单的代码,希望在其中更改set_current的值。错误消息:“参数类型'void'不完整”不断出现,我不确定为什么。

我不是一个经验丰富的编码员,但是我必须解决此问题才能上班。我真的希望你能帮助我。

void setCurrent(float set_current);

int main () { 
    printf("%i", setCurrent(0));
    printf("/n/r");
}

void setCurrent(float set_current){
    float v_set_cur = 1.25 + (ILIM_K_USE*set_current);
Run Code Online (Sandbox Code Playgroud)

在printf行上显示“参数类型'void'不完整”。当我删除0时,它可以工作,但我希望能够更改该数字。我在这里想念什么?

c c++ void incomplete-type

-1
推荐指数
1
解决办法
623
查看次数

标签 统计

c ×1

c++ ×1

incomplete-type ×1

void ×1