Is it possible to create a C varargs function with no arguments?

Viewed 3272

Possible Duplicate:
Is it possible to have a variadic function in C with no non-variadic parameter?

Is it possible to create a C varargs function with no arguments?

For example:

int foo(...);

I want to do something like the following:

list* create_list(...){
    list *mylist = list_create();
    void *current_arg = va_arg(void*);
    while (current_arg != NULL){
        list_add(mylist, current_arg);
        current_arg = va_arg(void*);
    }
    return mylist;
}
1 Answers
Related