Variable Argument Functions[QUESTION]
#1

How to do this in PAWN?

Код:
int Numbers::addNumbers(int n, ...)
{
	va_list args;
	int sum = 0;
	va_start(args, n);
	for (int x=0; x<n; x++)
	{
		sum += va_arg(args, int);
	}
	va_end(args);
	return sum;
}
Reply


Messages In This Thread
Variable Argument Functions[QUESTION] - by T0pAz - 27.12.2011, 12:58
Re: Variable Argument Functions[QUESTION] - by THE_KNOWN - 27.12.2011, 13:10
AW: Variable Argument Functions[QUESTION] - by Nero_3D - 27.12.2011, 13:12
Re: Variable Argument Functions[QUESTION] - by T0pAz - 27.12.2011, 13:14

Forum Jump:


Users browsing this thread: 1 Guest(s)