I was just wondering if there is an special method or call to set many variables to 0. I have like 20 and the code looks very ugly because i have them aligned like this:
x=0;
y=0;
z=0;
etc...
Since there are so many handy functions I thought there might be.
Thanks
PD: I’m using Objective C, Xcode 4.2
If they’re the same type (or are coercible to the same type), then you can always do:
It’s essentially the same thing, but horizontal 🙂