O,the right is #define swap(a,b) {temp=a; a=b; b=temp;}
if you lose "{}" that only execute temp=a;
________________________________
From: John Matthews <[email protected]>
To: [email protected]
Sent: Tuesday, June 9, 2009 1:51:06 AM
Subject: [c-prog] Re: unpredictable OUTPUT????
--- In c-p...@yahoogroups. com, "iamwljiang" <iamwljiang@ ...> wrote:
>
> don't forget "()"
> #define swap(a,b) (temp=a;a=b; b=temp;)
That doesn't compile.
See http://tech. groups.yahoo. com/group/ c-prog/message/ 70718
[Non-text portions of this message have been removed]