What does "..." in a function declartion mean?

This is a discussion on What does "..." in a function declartion mean? within the C Programming forums, part of the General Programming Boards category; Here is what I'm trying to do: Code: int ds_fscanf(FILE *f , const char *format, ...) { return KOS_fscanf( (KOS_FILE*) ...

  1. #1
    Registered User
    Join Date
    Apr 2006
    Posts
    6

    What does "..." in a function declartion mean?

    Here is what I'm trying to do:

    Code:
    int ds_fscanf(FILE *f , const char *format, ...)
    {
      return KOS_fscanf( (KOS_FILE*) f, format, ...);
    }
    The error I'm getting is on the return line...
    error: syntax error before '...' token
    If I comment out the return line then it compiles fine, so the "..." in the function declartion work fine, but it seems like I am unable to pass the "..." to ANOTHER function. How can I do this? What do the three dots even mean?

    Thanks!

  2. #2
    Just Lurking Dave_Sinkula's Avatar
    Join Date
    Oct 2002
    Posts
    5,006
    7. It is easier to write an incorrect program than understand a correct one.
    40. There are two ways to write error-free programs; only the third one works.*

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Seg Fault in Compare Function
    By tytelizgal in forum C Programming
    Replies: 1
    Last Post: 10-25-2008, 04:06 PM
  2. Another syntax error
    By caldeira in forum C Programming
    Replies: 31
    Last Post: 09-05-2008, 02:01 AM
  3. In over my head
    By Shelnutt2 in forum C Programming
    Replies: 1
    Last Post: 07-08-2008, 07:54 PM
  4. Change this program so it uses function??
    By stormfront in forum C Programming
    Replies: 8
    Last Post: 11-01-2005, 08:55 AM
  5. const at the end of a sub routine?
    By Kleid-0 in forum C++ Programming
    Replies: 14
    Last Post: 10-23-2005, 07:44 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21