This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: how to implement this ?


On 01/07/2013 04:46 AM, horseriver wrote:
> hi:
> 
>   how to implement this assignment by MACRO?
>   int a,b,c ;
>   
>   ((a==0)?b:c)=8;

This is for help with GCC, not general C coding help.

*((a==0) ? &b : &c) = 8;

But this is really horrible code.  I wouldn't do it.

Andrew.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]