This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: how to implement this ?
- From: Andrew Haley <aph at redhat dot com>
- To: horseriver <horserivers at gmail dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Mon, 07 Jan 2013 14:31:19 +0000
- Subject: Re: how to implement this ?
- References: <20130107044616.GD2432@debian.localdomain>
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.