What does “lvalue required” mean in a C compiler error? [closed]

旧时模样 提交于 2019-12-02 04:35:39

"Lvalue required" means you cannot assign a value to something that has no place in memory. Basically you need a variable to be able to assign a value.

in your particular case I would remove a>g=a:g=b and replace it with something more comprehensible, because in the current state nobody (including you and your compiler) has any slightest idea what that's supposed to be.

this : printf("%d",a>g=a:g=b); makes no sense. I cant tell if you tying to make a conditional in it which you shouldn't ever do especially for something so simple.

You should read into how printf works becuase either your not understanding what is need which is something like this:

int a = 1;
printf("%d",a);

or you meant to use somthing else but I have never seen a syntax like your doing before here a>g=a:g=b.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!