On Mon, Jan 07, 2013 at 11:25:10PM +0800, ugiwgh wrote: > If I didn't understand wrong, you can do it like this. > > #define calc(_a,_b,_c) ((0==(_a))?((_b)==8):((_c)=8)) > actually,I want use ((a==0)?b:c) to select a variable name ,which can be used as left value also as right value. thanks! gcc-help <gcc-help@xxxxxxxxxxx> > > > ------------------ Original ------------------ > From: "horseriver"<horserivers@xxxxxxxxx>; > Date: Mon, Jan 7, 2013 12:46 PM > To: "gcc-help"<gcc-help@xxxxxxxxxxx>; > > Subject: how to implement this ? > > > > hi: > > how to implement this assignment by MACRO? > int a,b,c ; > > ((a==0)?b:c)=8; > > if use this sentence ,gcc will tell :error: lvalue required as left operand of assignment > > is there s implementation for this with macro define? > > is there suggestion ? > > > thanks!