passing structure directly to function
Posted
by ra170
on Stack Overflow
See other posts from Stack Overflow
or by ra170
Published on 2010-04-08T17:03:18Z
Indexed on
2010/04/08
17:13 UTC
Read the original article
Hit count: 265
I have a struct that I initialize like this:
typedef struct
{
word w;
long v;
}
MyStruct;
MyStruct sx = {0,0};
Update(sx);
Now, it seems such a waste to first declare it and then to pass it. I know that in C#, there's a way to do everything in one line. Is there any possiblity of passing it in a more clever (read: cleaner) way to my update function?
© Stack Overflow or respective owner