Log in using your OpenID or your Sol Union log in account.
[Cancel]     

Tell Me How Im Doing
Hiya Squirt
Subject
Help
Hey Bum
There
Args
4d
NED
$*D
AI(MMO?)RTS-game
Nameless
Great News!
Args
Directory

Bjorfck Silas:
I don't see why va_start and co. are needed for utilizing arbitrary quantities of arguments rather than straight pointer arithmetic in C. It seems cleaner to just do something like this: int add_args(int count, ...) { int r,*i = &count; while(count--) r += *(i++); return r; } I'm sure there must be some scary reason for me not to do this, though, it concerning mucking around in the stack and all...

Ned Bingham:
Yeah, there is an issue with it. You could access the wrong memory by accident. va_start is used specifically because it's safer

Enter New Post