标签:
void printlist(int begin,...) { va_list ap; char *p; va_start(ap, begin); p = va_arg(ap, char *); while (p != NULL) { fputs(p, stdout); putchar(‘\n‘); p = va_arg(ap, char*); } va_end(ap); } int _tmain(int argc, _TCHAR* argv[]) { printlist(0, "hello", "world", "foo", "bar", NULL); char c; std::cin >> c; }
标签:
原文地址:http://www.cnblogs.com/ph829/p/5417752.html