+ 1
Is there a shorter way for this: int sum(int a, int b)?
So, this doesn't work: int sum(int a,b); 😐 I always prefere the shortest way. Maybe some C experts can give me some pro Tipps for shorten code? Thanks
1 Odpowiedź
+ 1
If I have many functions similar to the function below, I would make something like this;
struct values
{
int x,y;
};
int sum (values v);
Edit:
If you don't have many of this, as I know the shortest way is
int sum (int x, int y);
(as you said in the title)