foo(...), what are the three dots?

This is a discussion on foo(...), what are the three dots? within the C Programming forums, part of the General Programming Boards category; For example, in <stdio.h> , I noticed a declaration such as Code: int printf (const char* szFormat, ...); what kind ...

  1. #1
    Registered User
    Join Date
    Feb 2005
    Posts
    46

    foo(...), what are the three dots?

    For example, in <stdio.h> , I noticed a declaration such as
    Code:
    int printf (const char* szFormat, ...);
    what kind of parameter is (...) ?

    I tried writing my own function taking (...) and it runs, but what is it and how can I use it?

    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.*

  3. #3
    Registered User
    Join Date
    Feb 2005
    Posts
    46
    Thank you sir.

    As you could imagine, I didn't come up with anything when I searched for "..."

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 9
    Last Post: 06-18-2009, 04:58 AM
  2. Recursive Function
    By Codedecode in forum C++ Programming
    Replies: 5
    Last Post: 06-07-2008, 02:14 AM
  3. array -- foo, &foo and &foo[0]
    By George2 in forum C Programming
    Replies: 9
    Last Post: 08-14-2007, 01:22 PM
  4. anyone here hate when foo bar baz is used in example code?
    By shintaro in forum A Brief History of Cprogramming.com
    Replies: 18
    Last Post: 09-26-2006, 07:07 AM
  5. Couple of Q's.....
    By oobootsy1 in forum C++ Programming
    Replies: 18
    Last Post: 02-23-2004, 01:03 PM

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