Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include <iostream>
- using namespace std;
- int Sum(int a, ...)
- {
- int *p = &a;
- int sum = 0;
- while (*p)
- {
- sum = sum + (*p);
- p++;
- }
- return sum;
- }
- int _tmain(int argc, _TCHAR* argv[])
- {
- cout << Sum(5, 10, 5, NULL) << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement